DAYS

DAYS(end_date, start_date)

Returns the number of days between two dates.

end_dateThe date that represents the finishing date.
start_dateThe date that represents the starting date.

REMARKS
* Added in Excel 2013.
* The arguments are back to front, the end_date comes before the start_date.
* If "end_date" contains any time information, it is ignored.
* If "end_date" is not a valid date, then #VALUE! is returned.
* If "end_date" is not a valid serial number, then #NUM! is returned.
* If "start_date" contains any time information, it is ignored.
* If "start_date" is not a valid date, then #VALUE! is returned
* If "start_date" is not a valid serial number, then #NUM! is returned.
* This function can handle dates in text format.
* Text strings should be written in a date format that uses "mmm" or "mmmm" to avoid any confusion in different regions.
* Text strings that use a "m" or "mm" format will be evaluated using the Windows Regional Date Format.
* Dates can start from 1st January 1900 up to 31st December 9999.
* You can use the DATE function to return the date serial number given a year, month, day.
* You can use the DAY function to return the day as an integer given a date serial number.
* You can use the DAYS360 function to return the number of days between two dates, based on 30 day months.
* You can use the NETWORKDAYS.INTL function to return the total number of working days between two dates excluding weekends and holidays.
* For the Microsoft documentation refer to support.microsoft.com

 AB
1=DAYS("07 July 2020","01 April 2020") = 97Friday, January 10, 2020
2=B1-B2 = 9Wednesday, January 01, 2020
3=DAYS("10 January 2020","01 January 2020") = 9 
4=DAYS("31/12/2020","1/1/2020") = 365 
5=DAYS("10/1/2020","1/1/2020") = 9 
6=DAYS("1/10/2020","1/1/2020") = 274 
7=DAYS(1,1) = 0 
8=DAYS(1001,1000) = 1 
9=DAYS(DATE(2016,1,10),DATE(2016,1,1)) = 9 
10=DAYS(DATE(2016,12,31),DATE(2016,1,1)) = 365 
11=DAYS(DATE(2016,1,1),DATE(2016,1,10)) = -9 
12=DAYS(DATE(2016,-1,-1),DATE(2016,-1,-10)) = 9 
13=DAYS(31/12/2020,1/1/2020) = 0 
14=DAYS(-1,-1) = #NUM! 
15=DAYS(DATE(2016,1,"sometext"),DATE(2016,1,1)) = #VALUE! 

1 - How many days are there between "07 July 2020" and "01 April 2020".
2 - How many days are there between "10 January 2020" and "01 January 2020".
3 - How many days are there between "10 January 2020" and "01 January 2020".
4 - How many days are there between "31/12/2020" and "1/1/2020".
5 - How many days are there between "10/1/2020" and "1/1/2020". This formula is using the UK regional date format "dd/mm/yyyy" (10 Jan) and (1 Jan).
6 - How many days are there between "1/10/2020" and "1/1/2020". This formula is using the UK regional date format "dd/mm/yyyy" (1 Oct) and (1 Jan).
7 - How many days are there between the date serial number "1" and the date serial number "1".
8 - How many days are there between the date serial number "1001" and the date serial number "1001".
9 - How many days are there between "10 Jan 2016" and "1 Jan 2016".
10 - How many days are there between "31 Dec 2016" and "1 Jan 2016".
11 - How many days are there between "1 Jan 2016" and "10 Jan 2016".
12 - How many days are there between "1 Jan 2016" and "10 Jan 2016". The DATE function will ignore the minus signs for month and day.
13 - How many days are there between the date serial number "0.00127" and the date serial number "0.00049". These are not interpreted as dates.
14 - These are not valid date serial numbers.
15 - The finishing date is not a valid date.

© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited Top