Date Formula in Business Central

If you are working with NAV / Dynamics 365 Business Central, you will hear the term Date Formula. A date formula is a formula, abbreviated using combination of signs, letters and numbers, to calculate date. It is generally used to calculate date, such as Due Date or the next date for recurring job (Job Queue, Recurring Journals, etc).

The date formula can contain a maximum of 32 characters (signs, numbers, and letters). Below are the following letters and the meaning:

  • C: Current (end of)
  • D: Day
  • W: Week
  • WD: Week Day (not work day). Week Day 1 is Monday.
  • M: Month
  • Q: Quarter
  • Y: Year

Let’s take a look at some examples on what you can do with it.

DateDate FormulaResultMeaning
20 Apr 2022CM31 Apr 2022End of Month
20 Apr 2022-CM1 Apr 2022Beginning of Month
20 Apr 20221M20 May 2022Plus 1 Month
20 Apr 20221M+CM5 May 2022End of Next Month
20 Apr 2022CM+D2525 May 2022Day 25th of the following month
20 Apr 2022CM+45D14 Jun 202245 Days after End of Month
20 Apr 20227D27 Apr 2022Plus 7 Days
20 Apr 2022D77 May 2022The next Day 7th
20 Apr 2022D2525 Apr 2022The next Day 25th
20 Apr 2022-D1010 Apr 2022The previous Day 10th
20 Apr 2022 (Wed)WD125 Apr 2022The next Week Day 1: Monday
20 Apr 2022 (Wed)WD623 Apr 2022The next Week Day 6 : Saturday
20 Apr 20221Q+1M+CM31 Aug 2022Plus 1 Quarter and 1 Month, End of Month
20 Apr 20221Y-CY1 Jan 2023Beginning of Next Year
20 Apr 2022CY+1D1 Jan 2023Beginning of Next Year
20 Apr 2022 (Wed)CW24 Apr 2023End of this week (Sunday)
30 Jan 20221M28 Feb 2022Next month (February 2022 only has 28 days)

For developer who use DateFormula with CalcDate, make sure to use < > delimiters surrounding it (example: <1W> ), so the date formula is stored in a generic, nonlanguage-dependent format. This makes it possible to develop date formulas that are not dependent on the currently selected language.

thatnavguy

Experienced NZ-based NAV Developer and Consultant with 15+ years of experience leading multiple IT projects, performing business analyst, developing, implementing, and upgrading Dynamics NAV and Business Central. Passionate to deliver solution that focuses on user-friendly interface while keeping high standard of compliance with the needs.

You may also like...

3 Responses

  1. I am confused on the date. I want to run the Sales Order Status report once a week using the scheduler.

  1. 28 July 2022

    […] Date Formula in Business Central […]

Leave a Reply

Your email address will not be published. Required fields are marked *