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
* 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 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.
* You can use the TODAY function to return the date serial number representing today's date.
* You can use the DAYSINAMONTH - User Defined Function to return the number of days in a particular month and year.
* This function was added in Excel 2013.
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 AB
1=DAYS("07 July 2023", "01 April 2023") = 97Tuesday, January 10, 2023
2=B1-B2 = 9Sunday, January 01, 2023
3=DAYS("10 January 2023", "01 January 2023") = 9 
4=DAYS("31/12/2023", "1/1/2023") = 364 
5=DAYS("10/1/2023", "1/1/2023") = 9 
6=DAYS("1/10/2023", "1/1/2023") = 273 
7=DAYS(1, 1) = 0 
8=DAYS(1001, 1000) = 1 
9=DAYS(DATE(2022, 1, 10), DATE(2022, 1, 1)) = 9 
10=DAYS(DATE(2022, 12, 31), DATE(2022, 1, 1)) = 364 
11=DAYS(DATE(2022, 1, 1), DATE(2022, 1, 10)) = -9 
12=DAYS(DATE(2022, -1, -1), DATE(2022, -1, -10)) = 9 
13=DAYS(31/12/2022, 1/1/2022) = 0 
14=DAYS(TODAY(), "01 July 2022") = 640 
15=DAYS("01 Jan 2024", TODAY()) = -91 
16=DAYS(-1, -1) = #NUM! 
17=DAYS(DATE(2022, 1, "sometext"), DATE(2022, 1, 1)) = #VALUE! 

1 - How many days are there between "07 July 2023" and "01 April 2023".
2 - How many days are there between "10 January 2023" and "01 January 2023".
3 - How many days are there between "10 January 2023" and "01 January 2023".
4 - How many days are there between "31/12/2023" and "1/1/2023".
5 - How many days are there between "10/1/2023" and "1/1/2023". 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/2023" and "1/1/2023". 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 2022" and "1 Jan 2022".
10 - How many days are there between "31 Dec 2022" and "1 Jan 2022".
11 - How many days are there between "1 Jan 2022" and "10 Jan 2022".
12 - How many days are there between "1 Jan 2022" and "10 Jan 2022". 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 - Calculate the number of days between today and a previous date.
15 - Calculate the number of days from today to a future date.
16 - These are not valid date serial numbers.
17 - The finishing date is not a valid date.

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