Asked by Anonymous
1 years ago.
How does one convert a Daypilot.Date into a format “2025-06-10T14:00:00“ without using the ISO so that the offset is not taken into account.
We tried : args.end.toString("yyyy-MM-ddThh:mm:ss") but it does not work.
Thanks
Answer posted by Dan Letecky [DayPilot]
1 years ago.
The toString() method should work:
> new DayPilot.Date("2025-06-10T00:00:00").toString("yyyy-MM-ddThh:mm:ss");
"2025-06-10T00:00:00"
If you want to convert it to Date, you can use toDateLocal() to get a representation of the date/time value in the local timezone.
Comment posted by Anonymous
1 years ago.
If I already have a DayPilot date then :
dayPilotDate.toString("yyyy-MM-ddThh:mm:ss") does not seem to work.
Comment posted by Dan Letecky [DayPilot]
1 years ago.
And what do you get instead of the correct value?
This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.