Don Goyette wrote:
> > With 60*60*24 seconds per day, the number of days since the Unix epoch is:
> > sqlite> select strftime('%s', '2012-05-22') / (60*60*24);
> > 15482
>
> The timestamp in the tables I'm reading is not in the format of
> '2012-05-22'.
Sorry, my explanations were not clear enough. This is not yet the
conversion; here I just determined the number of days between the Unix
epoch and your example timestamp.
That was used to derive the actual conversion formula that you wanted:
> > (excel_timestamp - 25569) * (60*60*24)
And this was just a check of the formula, using your example timestamp:
> > > select datetime((41051.3958333334 - 25569) * (60*60*24), 'unixepoch');
> > 2012-05-22 09:30:00
Regards,
Clemens
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users