Current System Time.....?

Hi Aall,

How to get current System Time in AX …?

Is ther any function…?

Thanks in Advance…[:)]

Hai Bobby,

use this systemDateGet Function

Hi,

Three options -

  1. systemdateget()

  2. DateTimeUtil::getSystemDateTime() - this option as the name indicates will return the time part as well in UTC format

  3. DateTimeUtil::utcNow() - returns UTC time of the server

You may also want to read Vanya’s post on UTCDateTime in DAX 2009 (http://kashperuk.blogspot.com/2010/02/utcdatetime-in-dynamics-ax-2009.html)

Hi,

You can use the following code-

static void getTime(Args _args)
{
int hour,minute;
;
hour=timeNow()/3600;
minute=((timeNow() mod 3600)/60);
print strfmt(“Time - %1:%2”,hour,minute);
pause;
}

Regards,
Vinay