Syntax
=DAYS(end_date, start_date)Arguments
| Argument | Required | Description |
|---|---|---|
end_date | Required | The later date |
start_date | Required | The earlier date |
How to use DAYS
DAYS takes 2 required arguments. Type =DAYS( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=DAYS(DATE(2021,12,31), DATE(2021,1,1))Result =DAYS(DATE(2011,2,1), DATE(2011,3,15))Result Related date and time functions
- DATEBuilds a date from a year, a month and a day; months and days past the end roll over.
- DATEDIFCounts the whole days, months or years between two dates.
- DATEVALUEConverts a date written as text into a date serial number.
- DAYReturns the day of the month (1 to 31) of a date.
- DAYS360Returns the days between two dates on a calendar of twelve 30 day months.
- EDATEReturns the date a number of months before or after a date, on the same day of the month where possible.
- EOMONTHReturns the last day of the month a number of months before or after a date.
- HOURReturns the hour (0 to 23) of a time.
- ISOWEEKNUMReturns the ISO week number of the year (weeks start on Monday, week 1 contains the first Thursday).