The Excel DAYS function is a DATE & TIME function that can return the number of days between two dates.
Date and time
Find the number of days between two dates
An integer representing the number of days
=DAYS (end_date, start_date)
end_date – The end date
start_date – The start date
Number of days between two Dates (Direct Values)
The following formula will return the number of days between the two dates 01/01/2000 and 31/01/2018
Number of days between two Dates (cell references)
The following formula will return the difference between the two dates in the cells C3 and B3.
When the smaller date is used as first argument (start_date) function will return a negative value.
DAYS function will ignore the time part (decimal) of dates in Excel.