This function returns the number of days between two dates. This function is available from Excel 2013 and Excel for Mac 2011.
Syntax:
=DAYS(end_date, start_date)
Parameter list:
end_date – the end date.
start_date – the start date.
In this example we have calculated the number of days between two dates. You can see we are getting the #NUM value error when the range falls outside and #VALUE error when we try to compare the date and text.
If either one of the date arguments is text, that argument will be treated as DATEVALUE(date_text) and returns an integer date.
If date arguments are numeric values that fall outside the range of valid dates, DAYS returns the #NUM! error value.
If date arguments are strings that cannot be treated as valid dates, DAYS returns the #VALUE! error value.
If you want to directly enter the dates like this =DAYS(“22/05/2015”,“20/05/2015”) then you must enclose the dates in quotation marks.
Ask Your Query