Short answer: dateDiff(Date1, Date2, "Day") counts working days between two dates and skips weekends. Add false() to include weekends. To count both the start and end dates, or to skip your account's holidays, use calendarDays.
Why it happens
dateDiffstarts counting the day after the first date. Monday to Tuesday is 1.- By default
dateDiffskips weekends only. Holidays are skipped only if you pass a holiday list. - Empty or wrong results usually come from the wrong argument order, mixing Date and Date & time values, or a missing parenthesis.
How to fix it
Pick the formula for your case:
- Working days:
dateDiff(Start_Date, End_Date, "Day"). Put the earlier date first. - All days:
dateDiff(Start_Date, End_Date, "Day", false()) - Hours:
dateDiff(Start_Time, End_Time, "Hour"), or addfalse()to include weekend hours. - Skip specific holidays: pass them as a list, for example
dateDiff(Start_Date, End_Date, "Day", true(), ["2026-01-01", "2026-12-25"]). - Count both ends, skipping weekends and account holidays:
calendarDays(Start_Date, End_Date, "D", "WD"). Use"AD"for every day.
When one value is a Date & time, such as _completed_at, convert it to a date first:
dateDiff(Date_Field, date(_completed_at.year(), _completed_at.month(), _completed_at.day()), "Day")To show the day name, use Date_Field.toText("dddd"). weekDay() returns 1 for Sunday through 7 for Saturday.
To compare against fixed dates, use date() rather than text, for example today() >= date(2024, 11, 1).
See dateDiff function, calendarDays function and date expressions.
Tip
