On 6/25/15, Marco Bambini <marco at sqlabs.net> wrote:
> Hello I tried to convert an epoch time with a timestamp in milliseconds like
> 1393732179010 to a correct date but it seems like that the function:
> SELECT datetime(1393732179010, 'unixepoch', 'localtime');
> is not able to detect ms resolution and incorrectly reports a negative
> date.
>
> How can I tell sqlite to interpret timestamp in ms?

SELECT strftime('%Y-%m-%d %H:%M:%f',1393732179010*0.001,'unixepoch');

Output:  2014-03-02 03:49:39.010
-- 
D. Richard Hipp
drh at sqlite.org

Reply via email to