I receive from a Webservice a String with a date in this format:
yyyy-MM-ddTHH:mm:ss.fffZ
I need to convert that String with JavaScript to a normal DateTime but without using the new Date('yyyy-MM-ddTHH:mm:ss.fffZ')
because I'm using an old version of JavaScript that not support that conversion. I can split that string and get the:
but how to manipulate the time zone "fffZ"
Any suggestions?
Here's a one liner from John Resig:
var date = new Date((time || "").replace(/-/g,"/").replace(/[TZ]/g," ")),
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