Skip to content

Tag: datetime

convert js datetime to moment

I have this format of datetime currently stored in res.data[i].time: what I want to do is convert it to moment format. When i do this: it gives me this: what I want to need to do is convert 2022-05-18T13:00:00.000Z to moment somehow. I tried: but that doesn’t work either. is there a way to do this? Answ…

Formatting ISO time with Luxon

Using Luxon JS, I’ve been trying to format datetime to output in a certain format, using the native toISO function: This is what I get: And this is what I want: I know that they are both equivalent in terms of unix time and mean the same thing except in a different format, I just want to be able to