LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting numeric date retrieved by SQL from Access (*.mdb) to string

I'm using the SQL toolkit to access an MS ACCESS data base that has fields defined as date/time.  When I retrieve the date, I get an integer value instead of a string.

EX: the date of "9/21/2006" results in a value of 38981 when I retrieve the value from the DB.

Is there a function that will take that numeric value and convert it to a string? 
Is there a better way to retrieve dates from an ACCESS data base?

Thanks

0 Kudos
Message 1 of 2
(3,369 Views)
Nevermind - I answered my own question:

was trying to use:
DBBindColChar (SQLstmt, 2, 11, CalLast, &status, "");
which I assumed would work fine using the "default" formatting - but only returned ""

so I tried:
DBBindColChar (SQLstmt, 2, 11, CalLast, &status, "GD");
which did the same thing

so then tried
DBBindColChar (SQLstmt, 2, 11, CalLast, &status, "mm/dd/yyyy");
which works as intended.

0 Kudos
Message 2 of 2
(3,365 Views)