Wednesday, 16 May 2018



How to extract Date from utcDateTime in ax 2012 using x++


utcdateTime                 testDonedateTime1,testDonedateTime2;
utcdateTime                 testDonedateTime;
transdate                   tmpDate,tmpDate1 ;

;
testDonedateTime1 = ledgerJournalTable.createdDateTime;

testDonedateTime  = DateTimeUtil::applyTimeZoneOffset(testDonedateTime1, DateTimeUtil::getUserPreferredTimeZone());

 tmpDate = DateTimeUtil::date(testDonedateTime);

info(strfmt("Date -%1"),tmpDate));



Thanks
Akshay

No comments:

Post a Comment