Hi,
If dateTime is month/day/year with time
Why when we use dateTime2Str it becomes day/month...how can we keep it as month/day?
Hi junior AX,
Please check your user option preferences and language for Date, time, and number format. If it is already setup while date format is not as you expected, you can define format of datetime in your code (e.g. DATEFORMAT(dateTime2Str,"yyyy-MM-ddTHH:mm:ss")
Hi juniorAx,
Hope the below blog from Martin Drab will help you.
As per below blog make use of system.time to convert to specified format.
dev.goshoom.net/.../
Thanks,
Girish S.
It's important to realize that datetime values are not stored as string. If your statement "If dateTime is month/day/year with time" suggest that you think it's stored in a specific string format, you're wrong. A format (such month/day/year) applies only when the urcDateTime value gets converted to a string.
If you don't like the format used by dateTime2Str(), simply use a conversion function that allows you to specify a different format.
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 Pallavi Phade as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 756 Super User 2025 Season 2
CA Neeraj Kumar 678
Martin Dráb 526 Most Valuable Professional