Function to update a DateField with a new Date

MSaiMSai Member Posts: 1
Hey, i'm on a beginner Level :s my task ist to update a Date Field with a new Date in the PurchaseLine. Therefore i need a variable, which replace the old date and set the new, or overwrite the current Date...

Answers

  • vaprogvaprog Member Posts: 1,144
    Please be more specific when asking questions.

    Date is a datatype in NAV. Just declare a variable of type Date as you would declare one of type Integer or Boolean.

    Then you can assign a value to the variable, or use the value of the variable just as with any variable of any kind.

    There are funktions to construct a date, to get the current date (TODAY), to get the WORKDATE set in the client, to disect a date etc. e.g. get the month, get the day of the week ...

    There is also a type Time and a type DateTime, which is a combination of a date and a time into one single value. And there are more functions to deal with those and to convert between any of these.
Sign In or Register to comment.