Get Free Trial

How to manage the date time format in different regions

Naidu asked on July 2, 2020

Hi Team,
In the flat table, we are showing the date-time format is dd/mm/yyyy. How can we manage the date format for different regions?
Getting the date-time in JSON is 22/07/2020.
In some regions, we need to show it as in mm/dd/yyyy (07/22/2020). Is this possible in Flexmonoster?

1 answer

Vera Didenko Vera Didenko Flexmonster July 2, 2020

Hello, Naidu, 
Thank you for your question. 
In Flexmonster, the dateTimePattern property can be used to specify the way the dates should be formatted, for instance: 

options: {
dateTimePattern: "MM/dd/yyyy"

Here is a JSFiddle example for illustration:
In the provided example, the setOptions() API call is used to change the date formatting. 
In case you are using the "date string" date data type, please use the datePattern property instead.
For more information about the mentioned properties, please see our options object guide
Please let us know if this works fine for you. 
Looking forward to hearing from you. 
Kind regards, 

Please login or Register to Submit Answer