Re: Milliseconds to SQL Server DateTime
- From: Jouni Aro <jouni.aro@xxxxxxxxx>
- Date: Mon, 10 Dec 2007 15:56:42 +0200
Hi John,
John Herbster wrote:
"Jouni Aro" <jouni.aro@xxxxxxxxx> wroteI have now adopted the 'float' way and casting the values to
datetime in select. I will need to instruct the users also to
cast
Jouni,
I presume, by "cast", that you mean convert from one binary
form to another
Yes, by using the CAST() function in the SQL select as suggested by Vitt.
the data, if they need to add their own queries to the data. ...
I hope that you are aware that the TDateTime float type cannot
accurately represent millisecond times. That type can be very
close, but not exact.
Thanks for the note. The data is actually inserted from TDateTime:s so the resolution is actually enough. With the DateTime field, I could not get better than 1 second resolution - and that was a real problem.
.
- References:
- Re: Milliseconds to SQL Server DateTime
- From: John Herbster
- Re: Milliseconds to SQL Server DateTime
- Prev by Date: Re: Query based on the results of another query?
- Next by Date: Re: Finding a record number using SQL
- Previous by thread: Re: Milliseconds to SQL Server DateTime
- Next by thread: Query based on the results of another query?
- Index(es):
Relevant Pages
|