Showing posts with label Last day of month. Show all posts
Showing posts with label Last day of month. Show all posts

Sunday, 10 August 2014

Function to get last day of month in AX

Code to find the last day of month in Ax.

static void LastOfMonth(Args _args)
{
   TransDate transDate=today();
   TransDate LastOfMth;
   ;

   //LastOfMth=endmth(mkdate(1,1,2014));//To enter date using business logic.
   LastOfMth=endmth(transDate);

   info(date2str(LastOfMth,123,2,2,2,2,4));
}