For the complete documentation index, see llms.txt. This page is also available as Markdown.

Error: Incorrect Format. First Argument in Date Arithmetic Should Be a Date

This error means the first value in your date math is not a valid date.

S-Docs expects the first argument in <MATH type="date"> to be:

  • a date field

  • or a static date in yyyy-MM-dd format

If the value is missing, text-based, or actually a datetime field, the calculation fails.

Common causes

This error usually happens when:

  • the field is blank

  • the field is not a date field

  • the field is a datetime field, not a date field

  • the math expression starts with plain text instead of a date value

Example of the problem

This will fail because SERVICE INSTRUCTIONS is not a date:

invalid-date-math.txt
SERVICE INSTRUCTIONS + DAYS(21)

This can also fail if the merge field looks like a date to a user, but actually stores both date and time.

Correct pattern

Start the math expression with a real date field.

You can also format the result on the <MATH> tag.

How to fix it

Check each date math block in your template source.

Then confirm these items:

  • the first value is a real date field

  • the field is not blank

  • the field is not a datetime field

  • the tag includes type="date"

If you are using a static date, use this format:

2026-03-24

Quick checklist

Before you test again, confirm:

  • your tag starts with <MATH type="date">

  • the first argument is a date

  • static dates use yyyy-MM-dd

  • you are not using descriptive text in place of a date field

If a field includes both date and time, it may still fail in date arithmetic. Use a true date field whenever possible.

Next step

For a beginner walkthrough, see Get Started with Calculations.

Last updated

Was this helpful?