search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Date Format

Asked by Anonymous
2 days 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]
2 days 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
2 days 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]
2 days ago.

And what do you get instead of the correct value?

New Reply
This reply is
Attachments:
or drop files here
Your name (optional):