Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Timestamps: Change format


macp Jul 24, 2013 07:05 AM

Hi all.
I am using LNDB to store records to MySQ. The timestamps in the tables is of type DateTime.

DataTable (Test,1,-1)
DataInterval (0,100,mSec,10)
Sample(1,Accm,IEEE4)
Sample (1,T109_C,FP2)
EndTable

The current records in MySQL

2013-07-23 11:05:44
2013-07-23 11:05:44
2013-07-23 11:05:44
2013-07-23 11:05:44
2013-07-23 11:05:44
2013-07-23 11:05:44

I would like to store records to database in other format with higher precision.

Forexample:
2013-07-23 11:05:44.1
2013-07-23 11:05:44.2
2013-07-23 11:05:44.3
2013-07-23 11:05:44.4
2013-07-23 11:05:44.5
2013-07-23 11:05:44.6

Or timestamp in the format "MM/DD/YYYY HH:MM:SS.uu"

Thanks!


aps Jul 24, 2013 08:15 AM

Up until recently MQSQL did not support sub-second timestamp resolution. However, I read that from version 5.6.4 on it no longer discards subsecond information but stores it.

I am not sure whether LNDB tries to feed MYSQL the subsecond information or not (we need a LNDB expert to reply on that), but it is possible it does and a later version of MYSQL may store the fractional timestamp information automatically.

We do support sub-second resolution in SQL Compact and SQL Server implementations.

Log in or register to post/reply in the forum.