Notifications
Announcements
No record found.
Hi,
Is there date format/country mapping values in D365FO?
For example, US - MM/DD/YYYY, we need to develop a feature that if the user choose country (e.g. US), will change the date format setup for the user.
Thanks,
Hi Yuji,
You can configure that in the user option form.
Why do you need to develop something?
Best regards,
Ludwig
The standard control work on the basis of format defined on user options form see below:
When set to "en-IN",
When set to en-us then see below:
So define the appropriate locale in user options and you should be all set.
Also, if you want to display the date format by yourself, you can use date2str method to convert it in any format.
date2Str
(currentDate,
321,//Basically 1 = days, 2 = months and 3 = years ,like if you want to show year-month-days then use 321,If you want to use Month-days-year then use 213
DateDay::Digits2,
DateSeparator::Hyphen, // separator1
DateMonth::Digits2,
DateSeparator::Hyphen, // separator2
DateYear::Digits4
);
Refer to the DOC:
docs.microsoft.com/.../xpp-conversion-run-time-functions
Regards,
QianQW
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 544 Most Valuable Professional
André Arnaud de Cal... 450 Super User 2025 Season 2
Sohaib Cheema 250 User Group Leader