Hi,
print DateTimeUtil::newDateTime(today(), 0, DateTimeUtil::getCompanyTimeZone());
// Here today() is the date format not utcdatetime format...
print DateTimeUtil::date(UTCFieldValue);
// Here UTCFieldValue is theUTC date time field...
//Get date diff from 1 UTC date time and another date type in AX
return DateTimeutil::getDifference(
DateTimeUtil::newDateTime(resRentAgreement.StartDate, 0, DateTimeUtil::getCompanyTimeZone()),
resGracePeriodHistory.createdDateTime))
// here resRentAgreement is the date field and resGracePeriodHistory is UTCDateTime field.
Regards,
print DateTimeUtil::newDateTime(today(), 0, DateTimeUtil::getCompanyTimeZone());
// Here today() is the date format not utcdatetime format...
print DateTimeUtil::date(UTCFieldValue);
// Here UTCFieldValue is theUTC date time field...
//Get date diff from 1 UTC date time and another date type in AX
return DateTimeutil::getDifference(
DateTimeUtil::newDateTime(resRentAgreement.StartDate, 0, DateTimeUtil::getCompanyTimeZone()),
resGracePeriodHistory.createdDateTime))
// here resRentAgreement is the date field and resGracePeriodHistory is UTCDateTime field.
Regards,
No comments:
Post a Comment