I try to get the dateTIme in this format:
"2021-01-27T07:30:00Z"
so: yyyy-MM-ddTHH:mm:ssZ
But I get as format like this:
2021-01-27T09:48:00.000Z
So it seems that there is a extra double 00 in it.
So I have it now like this:
startLineChartDate = new Date();
this.startLineChartDate.setHours(1,0,0, 0);
const startDate = this.startLineChartDate.toISOString();
And I want to start time always on current day with: 00:00:00
But so what I have to change?
Thank you
question from:
https://stackoverflow.com/questions/65917820/how-to-convert-datetime-in-the-correct-iso-string-with-javascript 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…