Skip to content

Date Expression Tester

A single-page utility for trying out Business Central date formulas — the same <CW>, <-1M+CM>-style expressions you type into date-formula fields all over Business Central — without having to enter one into a real field and check the result. No setup and no license are required; install the extension and open the page.

Open the tool

  1. Search Business Central for Date Expression Tester (or calcdate / formula).
  2. Business Central opens it under Tasks.

Searching Business Central for "date expression t" shows Date Expression Tester under Tasks

Test an expression

  1. Type a formula into Date Expression. On first open this defaults to <CW> (end of the current week).

  2. Optionally change Reference Date — the date the formula is calculated against. It defaults to today, but set it to any date to see what the formula would have produced (or will produce) on that day.

  3. Leave the field.

    Expected result: Calculated Date updates with the result. If you need the day/week/year breakdown Business Central's Date2DWY() function would return for that result, expand Show more to reveal it.

Compare formulas at a glance

The Examples list on the page shows common formulas calculated against the same Reference Date you set above, so you can compare several at once instead of testing them one at a time:

ExpressionMeaning
<WD4>The next 4th day of a week (Thursday)
<-CW>Start of this week (Monday)
<CW>End of this week (Sunday)
<10D>10 days from today
<-CM>Start of current month
<CM>End of current month
<D10>The next 10th day of a month
<CM+10D>Day 10 of the following month
<2W>2 weeks from today
<CM+1M>End of next month
<Q3>Start of the next 3rd quarter
<-CY+Q2>Start of 2nd quarter this year
<-CY>Start of current year
<CY>End of current year
<CY+1D>Beginning of next year
<-1Y>1 year ago from today

Formula grammar reference

The Parameters list breaks down how a date formula is built, for whenever the examples above aren't quite the shape you need:

PartMade of
Date ExpressionUp to three Subexpressions in a row, e.g. <-CY+Q2>
SubexpressionAn optional Sign (+ or -) followed by a Term
TermNumber+Unit (10D), Unit alone (CW), or Prefix+Unit (CM)
NumberA positive integer
UnitD (day), WD (weekday), W (week), M (month), Q (quarter), Y (year)
PrefixC (current)

A couple of things that trip people up when reading these:

  • For the Prefix+Unit form (C = current period), the sign picks which end of that period you land on: <CM> (no sign) gives the end of the current month, <-CM> gives its start. For a plain Number+Unit offset like <10D> or <2W>, the sign instead just picks direction — forward or back from the reference date.
  • Chaining Subexpressions applies them left to right against the result so far, not all against the original reference date — <-CY+Q2> first jumps to the start of the current year, then moves forward to the start of the 2nd quarter from there.
  • The unit and prefix letters shown above (D, WD, W, M, Q, Y, C) are Business Central's own date-formula grammar, not this tool's — they automatically follow your Business Central language, even in languages this extension has no dedicated translation for.
  • The two navigation actions on the page — Use Date Formulas and System.CalcDate — link to Microsoft Learn's own reference if you need the full specification beyond what's summarized above.