Need a special offer?Find out if your project fits.
+

How to manage the date time format in different regions

Answered
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?
Example:-
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

Public
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: https://jsfiddle.net/flexmonster/rzhqL6vm/
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, 
Vera

Please login or Register to Submit Answer