DEV Community

Paul Fenwick
Paul Fenwick

Posted on

2 1

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)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay