28 February 2017

how to get different time zones time in AX 2012

static void timeZoneJob(Args _args)
{
    utcDateTime time1,time2;

    time1 = 2017-02-28T11:10:00;

    time2 = dateTimeUtil::applyTimeZoneOffset(time1,TimeZone::GMTPLUS0400YEREVAN); // manul time zone assign
    time2 = dateTimeUtil::applyTimeZoneOffset(time1,DateTimeUtil::getUserPreferredTimeZone()); // user based time zone assign  

    info(strFmt("%1",time2));

// AX 7

// DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone())
}

1 comment:

  1. I am not sure the place you are getting your information, however good topic. I needs to spend some time studying more or understanding more. Thank you for wonderful information I was in search of this info for my mission.
    Financial Planner Melbourne
    Financial Planning Melbourne
    Financial Planners Melbourne

    ReplyDelete

Give me the commetns and solutions

How to add the Display method in the form level in D365 F&O

 The below examle is to add the form -Data source level adding display method and assigning to form design control.