c# - Sqlite epoch datetime conversion -
So I'm trying to replace the Eucll time with a silicon database. I'm using the time column Type Typva
The stored value is: 1383928265 (11/8/2013 11:31:05 AM)
SQL:
var sql = "SELECT session_id , Xml, striptime ('% s', paused), striptime ('% s', time), processed "orig_title"; Result: 119360752804800 (10/13/1973 7 : 45: 52am)
My converter:
Unicetime (long unixtime) from public fixed date time {var Ugoch = new date time (1970, 1, 1 , 0, 0, 0, DateTime.UTC); Return Combination.Adecandonds (Unixtime) .OolocalTime ();} I Some adjustments were made to the converter:
Public static date time uptime (long UNIX) {var epoch = new date time (1970, 1, 1, 0, 0, 0, dateTimekind.UTC ); Var s = unixTime / 86400; Backward era.endendend (s) .OolocalTime ();} But this is the yield: 10/11/2013 6:34:37 AM
I can not find the correct date from the SQLite database.
Edit: Schema
You are using the wrong until you unixepoch modifier: & gt; ; No number is defined as Julian date. Select striptime ('% s', 1383928265), date time (1383928265); 119360535336000 3784354-44914542-14 12:00:00 & gt; Select striptime ('% s', 1383928265, 'UNIXPOK'), Dataim (1383928265, 'UNIXPOK'); 1383928265 2013-11-08 16:31:05 However, the value in the database is already the correct format that you want, so you should have strftime in the first place : SELECT session_id, xml, paused, time, orig_title from processed
Comments
Post a Comment