I need to convert a Date to a string in the YYYY-MM-DDTHH:MM:SS+HH:MM
format.
I know how to get it into YYYY-MM-DDTHH:MM:SSZ
or YYYY-MM-DDTHH:MM:SS.SSSZ
format, but not with the +HH:MM
.
How do I do so?
Asked
Active
Viewed 17 times
0

Mister Jojo
- 20,093
- 6
- 21
- 40

Rushwin Jamdas
- 344
- 1
- 5
- 18
-
Consider using monent.js – MTN Jul 20 '22 at 18:08
-
By not showing any explicit code, you reduce your hopes of having an answer... https://stackoverflow.com/help/how-to-ask – Mister Jojo Jul 20 '22 at 18:11
-
What is the offset that you are expecting to have displayed? In JS a Date is held as a UTC date, with no offset. The offset is relevant only when you want to indicate the local time in a specific timezone. Is it the timezone of the computer on which your app is running or the timezone of a remote user in some other location? – JohnRC Jul 21 '22 at 10:34