Click here to Skip to main content
15,890,391 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
CSS
I came across Sq-lite database.I found our date time is stored in 18 digit time-stamp.

Please help me how to convert it to Local Time. (I tried to convert it(No.of milliseconds from 1900). But i did not get it.It shows 29 days difference. I added 29 days of milliseconds to time. But time output is wrong.My assumption is, it will be NTP time.)


Here i give 18-digit time-stamp and its equivalent date time.

Time-Stamp                 Date-Time
--------------------------------------------
362087070028927400         27-10-2014 15:06:57
362087302762879170         27-10-2014 15:22:06
362087302763135170         27-10-2014 15:22:06
362087302851460030         27-10-2014 15:22:06
362087302851716030         27-10-2014 15:22:06
362087302851716030         27-10-2014 15:22:06
362087305419799000         27-10-2014 15:22:16
362087307972777150         27-10-2014 15:22:26
362087310530875300         27-10-2014 15:22:36
362087313092045760         27-10-2014 15:22:46
362087315652448200         27-10-2014 15:22:56
362087318210802600         27-10-2014 15:23:06
362087320772741060         27-10-2014 15:23:16
362087323333655740         27-10-2014 15:23:26


Thanks
Posted

1 solution

I don't its possible check this reference in msdn.

http://msdn.microsoft.com/en-us/library/ms182776%28v=sql.90%29.aspx[^]
 
Share this answer
 
Comments
muniprasad 4-Nov-14 3:00am    
Its showing about time stamp field. But i need conversion script.
ArunRajendra 4-Nov-14 4:07am    
That's right we can not convert Timestamp data datatype to date. you can convert but will not be same date as it is intended to be.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900