Format Date to DD.MM.YYYY
Format Date to DD.MM.YYYY
Hello everyone,
I am using datatable extracting data from an ajax file passing data with json and the date field is displayed like this:
a) without rendering -> /Date(1717107000000)/
b) DataTable.render.date() -> 31.5.2024
c) DataTable.render.datetime() -> 31.5.2024, 00:00:00
d) DataTable.render.datetime('DD.MM.YYYY') -> 30.05.2024
I want it to be displayed like in d), but for whatever reason it turns the 31st into the 30th (?!?).
Anyone have an idea about this?!
Answers
What timezone are you in please? It is almost certainly a timezone issue.
If I run (this is what
DataTable.render.date()
basically does):I get:
Are you able to have your server-side return ISO8601 formatted dates, rather than .NET epoch strings. That would take any uncertainty away.
Allan