javascript - How to convert "timestamp_usec"? - Stack Overflow

How can I convert a "timestamp_usec" number, such as 1364774098689591 to an actual datetime?

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 badges
Add a ment  | 

1 Answer 1

Reset to default 6

It'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

相关推荐

  • javascript - How to convert "timestamp_usec"? - Stack Overflow

    How can I convert a "timestamp_usec" number, such as 1364774098689591 to an actual datetime?

    22小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信