首页 > 解决方案 > How To Create a Timestamp In JavaScript

问题描述

I need to create a Timestamp like below. I have tried lots of ways , but couldn't get this format.

How can I create a current time and date in this Timestamp format in JavaScript ??

2018-08-20T04:19:50.670Z

标签: javascripttimestamp

解决方案


尝试这个

console.log(new Date().toISOString());

推荐阅读