DAYS (days between two dates)

Navigation:  Formulas and functions > Functions from A to Z >

DAYS (days between two dates)

Previous pageReturn to chapter overviewNext page

Syntax:

DAYS(EndDate, StartDate)

Description:

This returns the number of days between two dates.

Please note the order of the parameters: The end date has to be specified first and then the start date.

Note:

This function was revised in Calculate 2016: The order of its two parameters was reversed.

Background info: The DAYS function has been available in Calculate for a long time. Excel did not have this function until Excel 2013 when a function with the same name was added. This also works exactly like the DAYS function in Calculate – but the order of the parameters in Excel is the other way around: first the end date and then the start date. In order to be compatible with Excel, this order was adjusted accordingly in Calculate 2016.

The previous version of the function was renamed to DAYSP. Thus, the functions DAYS and DAYSP are identical, and only the order of their parameters differs:

DAYS(EndDate, StartDate) equals

DAYSP(StartDate, EndDate)

Compatibility notes:

Microsoft Excel supports this function only in version 2013 or later. The function is unknown in older versions.

Example:

DAYS("01/14/2018", "01/01/2018") returns 13

If cell A1 contains the date value 01/14/2018 and cell A2 contains the date value 01/01/2018:

DAYS(A1, A2) returns 13

See also:

DAYSP, DATEDIF, NETWORKDAYS, DAYS360, TIMEDIFF