Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : inserting TxnDateSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v7 Forum

 New Topic 
 
 Post Reply 
[1]  
 inserting TxnDate 
 Author   Message 
  john gott 
  
 Group: Members 
 Posts: 2 
 Joined: 2007-11-03 
 Profile
 Posted : 2007-11-03 03:24:26

I am limited with the date insert I can use with my translation software. I can only insert dates using the {ts’2007-10-01 00:00:00’} format. Since the TxnDate is in the {d’2007-10-01’} format, I am inserting my date into a varchar field and hope to update the TxnDate with this varchar date.  Can this be done?

Thanks,

John

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-11-03 09:27:03

Yes, you can use the CONVERT function within your SQL Statement to convert the timestamp to a date like this:

SELECT name, {fn CONVERT({ts'2007-10-01 00:00:00'}, SQL_TYPE_DATE)} AS "Date" From Customer

 

  Top 
  john gott 
  
 Group: Members 
 Posts: 2 
 Joined: 2007-11-03 
 Profile
 Posted : 2007-11-06 05:04:44

The date is being stored in the memo field as 2007-10-01. I need to update TxnDate with the value that is in the memo field.

 

Thanks,

John

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-11-06 08:30:41

Well this question is nothing like the first question, but if you're asking how to move a date from a memo field to the TnxDate, this is an example:

SELECT RefNumber, TxnDate, Memo FROM Invoice where RefNumber = '87'

Note the Memo has December 30 while the transaction date is December 23. Using this update statement I will move the Memo date into the TxnDate for this Invoice:

Update Invoice Set TxnDate = {fn CONVERT(Memo, SQL_TYPE_DATE)}  where RefNumber = '87'

Now when I rerun the query, the tranaction date is now December 30. I used the verify tag to reload the new values into the QODBC optimizer.

SELECT RefNumber, TxnDate, Memo FROM Invoice verify where RefNumber = '87'

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to