The last date of the month

ArchyArchy Member Posts: 70
edited 2006-05-09 in Navision Attain
How to find the last date of the any month?

Comments

  • jmjm Member Posts: 156
    Hi,

    please have a look at the "CALCDATE" in the C/SIDE-Online-Help.

    OR try CALCDATE('<CM>',DateofMonth)

    br
    Josef Metz
    br
    Josef Metz
  • ara3nara3n Member Posts: 9,256
    Here is how to do it

    message(format(CALCDATE('<CY>-11M'))); // 1/31/06
    message(format(CALCDATE('<CY>-10M'))); // 2/28/06
    message(format(CALCDATE('<CY>-9M'))); //etc etc
    message(format(CALCDATE('<CY>-8M')));
    message(format(CALCDATE('<CY>-7M')));
    message(format(CALCDATE('<CY>-6M')));
    message(format(CALCDATE('<CY>-5M')));
    message(format(CALCDATE('<CY>-4M')));
    message(format(CALCDATE('<CY>-3M')));
    message(format(CALCDATE('<CY>-2M')));
    message(format(CALCDATE('<CY>-1M')));
    message(format(CALCDATE('<CY>')));
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.