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.


5 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
  3. how to get date difference ?

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete

The Moment Tokens, Vectors, and Models Click, AI Starts Making Sense

  You've probably heard these terms dozens of times by now. They're showing up in AI discussions, Copilot demos, Azure OpenAI conver...

Powered by Blogger.