How can I convert a "timestamp_usec" number, such as 1364774098689591 to an actual date/time?
I downloaded my entire Google Search history. With each archived internet search (JSON File), Google includes a piece of meta-information called the "timestamp_usec."
I've found a few websites that do it for me, but I can't for the life of me find a JavaScript formula that will do it, or an explanation of how it's done.
I've found a few "unix timestamp" converters, but they don't seem to work on this "Timestamp_USEC," as it appears to be a different format.
Thanks!
How can I convert a "timestamp_usec" number, such as 1364774098689591 to an actual date/time?
I downloaded my entire Google Search history. With each archived internet search (JSON File), Google includes a piece of meta-information called the "timestamp_usec."
I've found a few websites that do it for me, but I can't for the life of me find a JavaScript formula that will do it, or an explanation of how it's done.
I've found a few "unix timestamp" converters, but they don't seem to work on this "Timestamp_USEC," as it appears to be a different format.
Thanks!
Share Improve this question asked Sep 30, 2016 at 19:06 Lukas UdstuenLukas Udstuen 551 silver badge6 bronze badges1 Answer
Reset to default 6It's not a "different format". It's just a conventional unix timestamp in microseconds, which means you can use the TRIVIAL conversion:
var d = new Date(1364774098689591 / 1000);
to load it up. JS Date()
expects milliseconds (among other formats), and microseconds = milliseconds * 1000
, after all...
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745180767a4615407.html
评论列表(0条)