Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Primer on basic date calculations:

C = Current
D = Day
W = Week
M = Month
Q = Quarter
Y = Year
CD = Current Day
CW = Current week
CM = Current month

...

-1Y = 1 year ago from today


Example:

Formula

Due date calculation (from “Document Date”)

30D

30 days

2W

2 weeks

D5

The next 5th day of a month

CM+10D

Current Month + 10 days

Example on due date calculations:

Document DateDue Date CalculationDue Date
11/5/202110D11/15/2021
11/5/20212W11/19/2021
11/5/2021D1011/10/2021
11/5/2021WD411/7/2021
11/5/2021CM+10D12/10/2021
11/5/2021-1Y11/5/2020

Example on complex due date calculations:

Case example 1 - yearly due date

a) if document date is before July 31, the due date is Jul 31 of the year.

...

a) Document Date before Jul 31

6/15/20215M11/15/2021

-CY1/1/2021

+7M8/1/2021

-1D7/31/2021

b) Document Date after Jul 31

10/15/20215M3/15/2022

-CY1/1/2022

+7M8/1/2022

-1D7/31/2022

Case example 2 - quarterly due date

a) due date on 1st Monday after beginning of the next quarter from the document date

Calculation formula can be 3M-CQ+WD1, calculation b/d as below:

6/15/20213M9/15/2021

-CQ7/1/2021

+WD17/5/2021


Reference: 

https://docs.microsoft.com/en-us/dynamics365/business-central/ui-enter-date-ranges#using-date-formulas