Skip to main content

Posts

Showing posts with the label ax 2012 time spiliting

split datetime in hour minutes second in different timezone in ax 2012

This is the example to  split datetime in hour minutes second in different timezone in ax 2012. TransDateTime myDateTime=DateTimeUtil::applyTimeZoneOffset(DateTimeUtil::getSystemDateTime(),Timezone::GMTPLUS0300KUWAIT_RIYADH); int hours; int minutes; int seconds; ; info(datetime2str(myDateTime)); hours=DateTimeUtil::hour(myDateTime); minutes=DateTimeUtil::minute(myDateTime); seconds=DateTimeUtil::second(myDateTime); info(strfmt('Hours %1 - Minutes %2 - Seconds %3',int2str(hours),int2str(minutes),int2str(seconds))); To get different timezone like GMT,India etc you can get from below screen.