Home

Get ISO datetime string in JavaScript

I am creating this post, just to generate the ISOString of current time. You can use this method to generate ISOString using any date object.

You can use the following JavaScript snippet to obtain the current date and time as an ISO string.

new Date().toISOString();

If you are on Google Chrome, you can use the copy() method available in the devtools console. This will copy the ISOString straight to your clipboard.

copy(new Date().toISOString());


Last Updated on

Next Post: GraphProtocol: TS2322 null assignment in Subgraph →

Comments