I have a very basic question to ask but I can't find it in Google and Stack Overflow too.
How to get current time with format example: 2018-01-22T11:48:39.396000Z in JavaScript?
I have a very basic question to ask but I can't find it in Google and Stack Overflow too.
How to get current time with format example: 2018-01-22T11:48:39.396000Z in JavaScript?
Is this what you mean?
new Date().toISOString() // "2018-03-02T03:46:26.814Z"
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString
You may try this.
var d = new Date();
var n = d.toLocaleString([], { hour12: true });