admin管理员组文章数量:1345174
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.
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.
Share Improve this question asked Jan 16, 2015 at 18:20 WHITECOLORWHITECOLOR 26.2k40 gold badges125 silver badges188 bronze badges1 Answer
Reset to default 10I believe this is the same as the ISO date format
var date = new Date();
var formatted = date.toISOString();
本文标签: xmlJavascript date to xsdateTimeStack Overflow
版权声明:本文标题:xml - Javascript date to xs:dateTime - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743808767a2542671.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论