admin管理员组文章数量:1414924
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...
本文标签: javascriptHow to convert quottimestampusecquotStack Overflow
版权声明:本文标题:javascript - How to convert "timestamp_usec"? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745180766a2646454.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论