Ax Code to get first and last day from date

To get First day of Month you can try below code.

info(date2str(DateStartMth(Today()),123,2,2,2,2,4));

To get Last day of Month you can try below code in job.

info(date2str(endmth(Today()),123,2,2,2,2,4));