The DAYS function - The function returns the number of days between 2 dates in Excel

DAYS function: The function returns the number of days between 2 dates, the support function from Excel 2013 onwards. Syntax: DAYS (end_date, start_date)

The following article introduces you to the DAYS function - one of the functions in the date and time group is very popular in Excel.

The DAYS function - The function returns the number of days between 2 dates in Excel Picture 1The DAYS function - The function returns the number of days between 2 dates in Excel Picture 1

Description: The function returns the number of days between 2 dates, the support function is from Excel 2013 version onwards.

Syntax: DAYS (en d_date, start_date)

Inside:

- end_date: The start date to calculate the number of days, is a required parameter.

- start_date: End date to calculate the number of days, is a required parameter.

Attention:

- If both end_date and start_date are numeric -> the function uses EndDate – StartDate to calculate the number of days between two dates.

- If one of the arguments end_date and start_date is text, it takes the date value via the DATEVALUE (date_text) function.

- If 1 of the 2 arguments end_date and start_date is outside the valid range of the day -> the function returns the #NUM! Error value

- If 1 of the 2 arguments end_date and start_date cannot be parsed into a valid date -> the function returns the #VALUE! Error value

For example:

Calculate the number of days between the following dates according to the description table:

The DAYS function - The function returns the number of days between 2 dates in Excel Picture 2The DAYS function - The function returns the number of days between 2 dates in Excel Picture 2

- In the cell to calculate enter the formula: = DAYS (F7, I7).

The DAYS function - The function returns the number of days between 2 dates in Excel Picture 3The DAYS function - The function returns the number of days between 2 dates in Excel Picture 3

- Press Enter -> The total number of days between the 2 days above is:

The DAYS function - The function returns the number of days between 2 dates in Excel Picture 4The DAYS function - The function returns the number of days between 2 dates in Excel Picture 4

- Similarly copying the formula for the remaining values ​​results:

The DAYS function - The function returns the number of days between 2 dates in Excel Picture 5The DAYS function - The function returns the number of days between 2 dates in Excel Picture 5

- In case of entering the wrong date value -> function returns the error value #VALUE!

The DAYS function - The function returns the number of days between 2 dates in Excel Picture 6The DAYS function - The function returns the number of days between 2 dates in Excel Picture 6

Here the month / day / year format because the wrong month value is 15, the function returns the #VALUE! Error value .

Above are instructions and some specific examples when using the DAYS function in Excel.

Good luck!

4 ★ | 2 Vote