Get Day, Month and Year from Date in AX 2012

TransDate                        reportedDate;
Int                                    day, month, year;

reportedDate = getServerDate();

Get Day from date
day      = dayOfMth(reportedDate);

Get Month from date
month  = mthOfYr(reportedDate);

Get Year from date
year      = year(reportedDate);

Comments