How to get the Last Day of a period?

selece28selece28 Member Posts: 316
Hi All,
I have a problem. I have a text field consist of year and month.
Example : 200001, 200011, 200012, etc
I want to make this period into Date format in Nav.
But i need the last date for the period first do i can use DMY2DATE function.

Is anyone know how to get the last date?

Thanks in advance
______________

Regards,
Steven

Answers

  • kinekine Member Posts: 12,562
    1) Split the string to Year and Month no.
    2) Assign these values into Integer variable (Evaluate function)
    3) Make the date for 1st day of the month
    4) Use CALCDATE with <+CM> to get the last date of the period.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • selece28selece28 Member Posts: 316
    Yes, finally solved
    Thanks Kine :)
    ______________

    Regards,
    Steven
  • kinekine Member Posts: 12,562
    You are welcome... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • andy76andy76 Member Posts: 616
    I need to have the First date of a fiscal year (year actual) and of previous fiscal year.
    Is that possibile?

    For example 01.01.2008 and 01.01.2007 for a date of today.
    The fiscal year could not be 01.01 as sun/solar year.

    Thank you
  • kinekine Member Posts: 12,562
    Wat about using the table "Accounting Period" to find it?

    it means something like "Find last Accounting Period where New Fiscal Year is yes and Starting Date is less than today".


    ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • EugeneEugene Member Posts: 309
    .
Sign In or Register to comment.