DEV Community

Paul Fenwick
Paul Fenwick

Posted on

QL to query convert chrome time stamp to epoch milliseconds

I am trying query the Chrome history database and return the chromium timestamp as human readable. for example 14/06/2022 10:05:30.25

SELECT u.url AS URL, u.title AS Title, u.visit_count As "Visit Count", datetime(u.last_visit_time / 1000000 + (strftime('%s', '1601-01-01')), 'unixepoch', 'localtime') As "Last Visited Date Time", datetime(v.visit_time / 1000000 + (strftime('%s', '1601-01-01')), 'unixepoch', 'localtime') AS "Visited Date Time" FROM urls u, visits v WHERE u.id = v.url

Top comments (0)