SQL Lite Date Time format to Mysql timestamp


I’ve a SQL Lite DB holding historical data (trendlog) and date and time in a string format ; by using a jdbc jar, I can read/write the db but handling timestamp is a different story.

I’ve SQLTags for each column (ID(int), SEQ(int), time_stamp(string), Value(float), Quality(int)) and need to store it with historical group. Of course, time_stamp is from the equipment and is different (older) from gateway or client time.

How can I convert 2011-08-17T14:10:23.000 to a MySQL timestamp ?


Replacing the “T” with a space would seem to do the trick. You can then log the expression as the time stamp and not the SQLTag directly.

WoW Jordan…
Not yet tested but so simple that of course I would have never thought about it :wink:
I’ll test it quickly.

Many thanks.