DAYS
TheDAYS
function calculates the number of days between two dates. It takes two date values as input: end_date
and start_date
. The function returns the number of days between the two dates, where the end_date
is inclusive and the start_date
is exclusive.
- How to use
DAYS
formula? - Examples of using
DAYS
formula DAYS
formula not working?- Similar formulas to
DAYS
Usage
Use the DAYS
formula with the syntax shown below, it has 2 required parameters:
- end_date (required):
The end date of the time period for which the number of days is to be calculated. This should be a valid date value, or a reference to a cell containing a date value. - start_date (required):
The start date of the time period for which the number of days is to be calculated. This should be a valid date value, or a reference to a cell containing a date value.
Examples
Here are a few example use cases that explain how to use theDAYS
formula in Google Sheets.
Calculate duration of a project
You can use the DAYS
function to calculate the duration of a project by subtracting the start date from the end date.
Calculate age
You can use the DAYS
function to calculate the age of a person by subtracting their birthdate from the current date.
Calculate days until deadline
You can use the DAYS
function to calculate the number of days until a deadline by subtracting the current date from the deadline date.
Common Mistakes
DAYS
not working? Here are some common mistakes people make when using the DAYS
Google Sheets Formula:
Incorrect order of arguments
One of the most common mistakes is to switch the order of the end_date and start_date arguments. Make sure to provide the correct order of the arguments.
Incorrect date format
The DAYS formula requires the date to be in a valid format. Check that the date is correctly formatted and does not contain any extra spaces or characters.
Invalid date range
The end_date must be greater than or equal to the start_date. Check that the date range provided is valid.
Related Formulas
The following functions are similar to DAYS
or are often used with it in a formula:
-
DATEDIF
The
DATEDIF
function in Google Sheets calculates the difference between two dates using a specified unit of measurement. This function is commonly used to calculate the length of time between two dates, such as the number of days, months, or years. The function is particularly useful when working with financial or project planning data. -
DATEDIF
The
DATEDIF
function in Google Sheets calculates the difference between two dates using a specified unit of measurement. This function is commonly used to calculate the length of time between two dates, such as the number of days, months, or years. The function is particularly useful when working with financial or project planning data. -
DATE
The
DATE
formula is used to create a date object in Google Sheets. It takes three arguments: year, month, and day and returns a date. This formula is useful when you need to perform date calculations or create date-based charts and graphs. -
NOW
The
NOW
function in Google Sheets returns the current date and time, updated in real-time. This function is commonly used to create timestamps for data entry or to track changes made to a sheet.
Learn More
You can learn more about the DAYS
Google Sheets function on Google Support.