X++ Get Start Date and End Date of Month

Use following methods to get Month Start Date and Month End Date. Pass any date of month in parameter.

Month Start Date : 
 
 TransDate dateInMonth=today();  
 TransDate firstDateOfMonth;  
 ;  
 firstDateOfMonth = DateStartMth(dateInMonth); 

Month End Date :

 TransDate dateInMonth=today();  
 TransDate endDateOfMonth;  
 ;  
 endDateOfMonth= endmth(dateInMonth);

Comments

Post a Comment

Popular posts from this blog

Dynamics AX 365 : The name does not denote a class, a table or an extended data type

Error while setting server report parameters. Error message: The permissions granted to user are insufficient for performing this operation. (rsAccessDenied)