Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
2 ratings:
 5 out of 5     Rate this Document

What Date/Time Format Should I Use for Microsoft Access?

Primary Software: LabVIEW Toolkits>>Enterprise Connectivity Toolset
Primary Software Version: 3.0.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem: I am trying to send a date/time value to a Microsoft Access database using the SQL VIs, but I cannot find the right format.

Solution: You have a few options. If you are directly sending SQL statements to an Access database as a string, then you can use one of these methods:
  • Date() + Time()
  • '07/21/2000 12:13:45'
  • #07/21/2000 12:00:00#

Or for G to Sql (or G to ODBC) VIs:
  • '[dt'2000-07-22 22:14:07.000000']'

but not with:
  • #[....]#

To query for time <= or >=, try using:
  • >= # date/time #

Similarly for <=:
  • <= # date/time #

If you simply use:
  • 'date/time'
then nothing will match your query.

Related Links:

Attachments:





Report Date: 07/24/2000
Last Updated: 11/30/2004
Document ID: 1ZNAJHJ6

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit