Announcements
No record found.
I have created date time in sales table for ax 09/02/2018 and when I select this date in job I found 08/02/2018 any help for that
*This post is locked for comments
the sales order hours 01:30:00 am
and in job 11:30:00
Ax stores dates in UTC and show them in user's time zone, thats why you see the difference. You need to apply time zone in you job when you comparing dates, please read for details [View:https://technet.microsoft.com/en-us/library/gg231389.aspx]
Hi,
utcDateTime calculation depends on timezone and its relevant offset. Please use below code, I useduserPreferredTimeZone for calculating offset. Hope this works for you.
static void AXC_UTCDateTime(Args _args) { SalesTable salesTable; utcDateTime myDateTime; Timezone myTimeZone = DateTimeUtil::getUserPreferredTimeZone(); select firstOnly SalesTable; myDateTime = SalesTable.createdDateTime; myDateTime = DateTimeUtil::applyTimeZoneOffset(myDateTime, myTimeZone); info(strFmt("%1", myDateTime)); }
thank you Chaitanya Golla
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CP04-islander 16
GiacomoRovai 4
Douglas Noel 2