Is there a simple way to convert standard Javascript date format to xs:dateTime
So I have a date value (new Date()) and I need in the format: 2015-01-16T20:26:53.974+03:00
so
Fri Jan 16 2015 22:26:53 GMT+0500 (Ekaterinburg Standard Time) -> 2015-01-16T20:26:53.974+03:00
It strange but cound't find simple solution.
I believe this is the same as the ISO date format
var date = new Date();
var formatted = date.toISOString();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With