The Excel Days function returns the number of days between two supplied dates.
Note: the Days function was only introduced in Excel 2013, so is not available in earlier versions of Excel.
The syntax of the function is:
where the end_date and start_date arguments are valid Excel dates.
Note that the end_date and start_date arguments should be input to the Days function as either:
This is because date arguments that are supplied to Excel functions as text representations of dates can be interpreted differently, depending on the date systems and date interpretation settings on your computer.
The following spreadsheet shows a simple example of the Excel Days function.
Formula:
 Result:

The Days function in cell B1 of the above example spreadsheet returns the value 32.
I.e. there are 32 days between the two dates 01/01/2015 and 02/02/2015.
For further details and examples of the Excel Days function, see the Microsoft Office website.
If you get an error from the Excel Days function, this is likely to be one of the following:
#NUM!    Occurs if one or both of the supplied end_date and start_date arguments are numeric values, but are not recognised as valid dates. 
#VALUE!    Occurs if one or both of the supplied start_date and end_date arguments are text values that can not be interpreted as dates. 