06-01-2006 06:32 AM
06-01-2006 09:40 AM
06-01-2006 10:06 AM
06-01-2006 10:10 AM - edited 06-01-2006 10:10 AM
Message Edited by David Crawford on 06-01-2006 04:10 PM
06-01-2006 11:07 AM
06-01-2006 11:24 PM
06-01-2006 11:35 PM
06-03-2006 02:10 AM - edited 06-03-2006 02:10 AM
Hi Huang,
In addition to the approaches above, you might store your timestamp-DBL as a DBL, but in the DB's time format. MSAccess and SQL Server use a DBL to store times as the DAYs since 12am DEC 31 1899. I'd be interested to know if MYSQL doesn't use the same format. On the down-side you'll have to convert LabVIEW's timestamp-DBL to the DB's timestamp-DBL, and when you want to see the string-representation of the time-DBL stored in MSAccess, you'll have to use the function CVDate(YourDBL) (SQL Server use CAST(datetime, YourDBL)).
... but on the UP side, no DBL to string conversion (with accompanying loss of precision) is necessary when storing the timestamp, and no string to DBL conversion is necessary when recovering the LabVIEW representation (in this case there's a DBL to DBL conversion). This method also overcomes a problem that can occur if storing times as strings in a country where daylight-savings-time is used. Here, twice a year, timestamps stored as strings will jump forward (or backward) one hour, unless special precautions are applied in the OS.
Cheers.
Message Edited by Dynamik on 06-03-2006 02:14 AM
Message Edited by Dynamik on 06-03-2006 02:15 AM