w3resource

Excel DAYS() function

DAYS() function

This function is used to return the number of days between two dates.

Version: Excel 2013

Syntax:

DAYS(end_date, start_date)

Parameters:

Name Description Data Type Required/
Optional
End_date Start_date and End_date are the two dates between which you want to know the number of days. Number Required
Start_date Start_date and End_date are the two dates between which you want to know the number of days. Number Required

NOTE Excel stores date as sequential serial numbers so that they can be used in calculations. By default, Jan 1, 1900, is serial number 1, and January 1, 2010, is serial number 40179 because it is 40178 days after January 1, 1900.

Remarks

  • when both date arguments are numbers, DAYS uses EndDate–StartDate to calculate the number of days in between both dates.
  • when either one of the date arguments is text, that argument is treated as DATEVALUE(date_text) and returns an integer date instead of a time component.
  • when date arguments are numeric values that fall outside the range of valid dates, DAYS returns the #NUM! error value.

Example - 1:

The example below finds the number of days between the end date (3/20/14) and end date (2/1/14). When you enter a date directly in the function, you need to enclose it in quotation marks.

days1

Example - 2:

The example below finds the number of days between the end date in A2 and the start date in A3 (364).

days2

Previous: Excel DAYS360() function
Next: Excel EDATE() function



Follow us on Facebook and Twitter for latest update.