If you just convert that floating number back to a date using the CDate 
Function. It properly converts it back.  Open the vb project and do not 
run it but just open the Immediate window and type the following lines and 
you will see it do the conversion.
? cdate(39895.56086) 
 3/23/2009 1:27:38 PM 
?cdate(39895.57176)
3/23/2009 1:43:20 PM 

Hope this helps.





Rene Claassen <claassen.r...@gmail.com> 
Sent by: sqlite-users-boun...@sqlite.org
04/29/2009 09:18 AM
Please respond to
General Discussion of SQLite Database <sqlite-users@sqlite.org>


To
sqlite-users@sqlite.org
cc

Subject
[sqlite] Another Date Question






I've had a problem before where I received an 'Invalid Use of Null' error
when I'm quering a DateTime field from vb6. Olaf send me a link to another
class, and when I used that I could query the data, but I still have a
problem if I want to link to the data from MS Access or Cold Fusion.

If I do a normal select on the field in SQLite2008 I get the following:
Select Date_Stamp
from in_wt;
2009-03-23 13:27:38
2009-03-23 13:43:20 etc

If I export this resultset from SQLite2008 to a csv file it exports the 
data
with / instead of -. I don't know how it is actually stored in the db.
"2009/03/23 01:27:38 PM"
"2009/03/23 01:43:20 PM"

If I query the data as datetime it shows me incorrect dates:
Select datetime(Date_Stamp)
   from in_wt;
   -4603-02-16 01:27:38  -4603-02-16 01:43:20

And lastly if convert it to a float it gives the following:
Select cast(Date_Stamp as float)
   from in_wt;
   39895.56086  39895.57176

If I use the cast as float in vb it doesn't give an error, but I don't 
know
how to convert the 39895 to a correct date format. Can anyone please 
explain
to me what is going on here.

Thank you
Rene
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to