I have a string "2016-01-01T00:20:50z"
. How can I parse the string into date and time format in Javascript? Such as for string date: "2016-01-01"
and for string time format: "20:50"
.
Thank you
I have a string "2016-01-01T00:20:50z"
. How can I parse the string into date and time format in Javascript? Such as for string date: "2016-01-01"
and for string time format: "20:50"
.
Thank you
I would highly recommend Datejs at "https://github.com/datejs/Datejs" for all things dealing with date and time. It can parse "2016-01-01T00:20:50Z" correctly (note the "z" has to be capital.)