LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SQL TimeDate query

I am trying to retrieve some records (rows) with values between two DateTime values using the DB Tools Select Data.vi included in the Database Tools Kit for LabVIEW.  The database table is an MS Access table with the Date and Time field being of the Date/Time Data Type. 
 
For example, I would like to retrieve the records from 07/01/2005 01:11:34 to 07/01/2005 05:54:23.  There are approximately 55 records that would meet that criteria in the table.
 
I have tried many different formats for the date and time values but when I run the VI it always returns zero (0) records.
 
Does anyone have any ideas on how this can be done?
 
Thanks,
 
Dale
0 Kudos
Message 1 of 3
(2,849 Views)

Hi Dale

Sounds like you have the same problem as mention in this thread

http://forums.ni.com/ni/board/message?board.id=170&message.id=161319&query.id=13777#M161319

Becktho was able to help that person with his solution.

David

0 Kudos
Message 2 of 3
(2,841 Views)
The easiest way to do this is usually to create a query which works in Access, copy its SQL code to LV and then rebuild the string replacing the dynamic parts as needed. Then, you run it using the Execute Query VI.

___________________
Try to take over the world!
0 Kudos
Message 3 of 3
(2,839 Views)