DAYS

Returns the number of days between two dates

Usage

DAYS(end_date, start_date)

Parameters

end_date

(Required) The end date of the period

start_date

(Required) The start date of the period

Examples

Example With these variables Result

DAYS(end, start)

start is DATE(2023, 1, 1)
end is DATE(2024, 1, 1)

365

DAYS(DATE(2024, 1, 12), DATE(2024, 5, 28))

(None)

-137

More information

The result is the number of days from start_date to end_date. If start_date is later than end_date, the result will be negative.

Reminders

A text containing a date is not handled as a date. To have an actual date:

  • use the @DATE_QUESTION to set the variable
  • use a function that converts to a date: DATEVALUE(text_date)
  • use a function that returns a date: TODAY() or DATE(year, month, day)

See also