DAYS Function – Google Sheets

The DAYS function is a simple date function that lets you calculate the number of days between two dates. The same result can arrived at by simply subtracting two dates such as: ="7/31/2016"-"6/5/1991".

Purpose

The DAYS function returns the number of days between two dates.

Related functions

DATEDIF – Calculate length of time between two dates in years, months, and/or days.

MINUS – Subtract one value from another. Can be done with dates.

Errors

#NUM – The inputs are numbers but are not valid dates. This could happen if you used the 35th day of November, “11/352018”.

#VALUE! – The inputs are something that doesn’t convert to a number such as “The other day” or “Yester-yester-day”.

Syntax

=DAYS(end_date,start_date)

Note that, for some reason, the function wants the ending date first, then the starting date.

Video Explanation

Examples

A few simple examples of the DAYS function.

Formula Description Result
=DAYS("7/31/2017","7/30/2016") Number of days between 7/30/2016 and 7/31/2017 366
=DAYS("1/7/2020","12/5/2015") Number of days between 12/5/2015 and 1/7/2020 1,494
=DAYS(C3,"2/9/1994") Number of days between 3/5/2001 (assuming that the value was in C3) and 2/9/1994 -2,581

 Live examples in Sheets

Go to this spreadsheet for examples of the DAYS function that you can study and use anywhere you would like.

WORKDAY Function – Google Sheets

The WORKDAY function calculates a workday a given number of days away from a date. You can optionally specify a list of holidays to exclude from the count. If your days, months, and years are in different cells, use the DATE function to combine them.

Syntax

=WORKDAY(start_date,days,[holidays])

  • start_date – The date from which to start counting the days.
  • days – The number of days to add to the start_date
  • [holidays] – Optional specification of which days are to be excluded from the count of work days.

Related functions

WEEKDAY – Returns the week number for a given date.

DAYS – Find the number of days between two dates.

NETWORKDAYS.INTL – Calculate the number of working days in between two days and exclude specified days as weekends.

NETWORKDAYS – Calculate the number of working days in between two days and exclude weekends.

WORKDAY.INTL – Like this function but with movable weekends.

Errors

#NUM – The inputs are numbers but are not valid dates. This could happen if you used the 35th day of November, “11/35/2018”.

#VALUE! – The inputs are something that doesn’t convert to a number such as “The other day” or “Yester-yester-day”.

 Live examples in Sheets

Go to this spreadsheet for the examples of the WORKDAY function that you can study and use anywhere you would like.