Difference between today and systemDateGet methods

print today(); // will print system date on which AOS is running.( Machine) ( It doesn't support time zone)
print systemDateGet(); // will print Ax session date. ( supports Time zone)
To note the different you need to change the session date of AX (Tools Session date)


which is prepared
 Its always prepare to use SystemDateGet() when dealing with financial transactions


static void Test(Args _args)
{
    utcDateTime  utc;
    print today();
    print systemDateGet();
    print DateTimeUtil::getSystemDateTime();
    utc = DateTimeUtil::newDateTime(today(), timeNow(),DateTimeUtil::getUserPreferredTimeZone());
    print utc;
   pause;
}

Comments