[Chartjs]-Problem with changing string to date with time

1👍

Map the numbers into a string in the ISO standard, which looks like '2020-08-10T22:36:25.772'

So in your case it would look like '2020-07-11T23:11:52.000'. Note that it looks pretty much identical to what you’ve already got, except the T between the date and the time of day, and append .000 to the end to set the milliseconds component to zero.

Then take your string and use new Date('2020-07-11T23:11:52.000')

enter image description here

Leave a comment