109
rated 0 times
[
114]
[
5]
/ answers: 1 / hits: 16272
/ 7 Years ago, mon, april 10, 2017, 12:00:00
Basically I have a Date object. How can convert it to a string compatile with datetime-local
format yyyy-MM-ddThh:mm?
I tried Date.toISOString
method, but it doesn't work as it appends .SSSZ
at the end. Gives me the following output The specified value 2017-04-10T17:02:00.320Z does not conform to the required format. The format is yyyy-MM-ddThh:mm followed by optional :ss or :ss.SSS.
.
Does anyone have any clean solution to this problem?
More From » javascript