How do i get this kind of time format when "now" in javascript? -


i have need put kind of format when doing action:

2014-11-19t10:07:25.000z 

like when in press of action button, need alert current time in format above, in javascript, plain , simple...

what correct way so?

this returned format of toisostring method of date instance.

new date().toisostring(); //"2014-12-06t08:10:55.713z" 

more on date , time iso, see mdn , wikipedia.


Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -