Skip to main content

Some Important date functions in AX


Dayname: Retrieves the name of the day of the week specified by a number.
wkofyr : Calculates the week of the year in which a date falls

mthofyr: Retrieves the number of the month in the year for the specified date.

mthname : Retrieves the name of the specified month

mkdate : Creates a date based on three integers, which indicate the day, month, and year, respectively.

dayofmth: Retrieves the day of the specified date.

dayofyr: Retrieves the day of the specified date.

year: Get year from date

dayofwk: Calculates the day of the week for a date.

prevmth:  Retrieves the date in the previous month that corresponds most closely to the specified date.

prevyr: Retrieves the date in the previous year that corresponds most closely to the specified date.

prevqtr: Retrieves the date in the previous quarter that corresponds most closely to the specified date.

Today: Retrieves the current date on the system.


Comments

  1. How to get a prevDay()?
    Like 1/1/2013 from 2/1/2013?

    ReplyDelete
    Replies
    1. I dont think you have prevDay() available. You can write it as: date1 = currentdate - 1;

      Delete
  2. This comment has been removed by the author.

    ReplyDelete

Post a Comment