Essential Date Functions for Google Sheets

Introduction

Google Sheets offers a variety of date functions that can help you manage and manipulate dates in your spreadsheets. Whether you need to calculate the number of days between two dates, extract specific date components, or format dates, Google Sheets has a built-in set of functions to make your work easier. In this tutorial, we will go over the most essential date functions and how to use them effectively.

Step 1: The TODAY Function

The TODAY function returns the current date. It is useful for calculations that involve today's date, such as calculating the number of days since a certain event or tracking how long something has been happening.

Syntax:

TODAY()
        

Example:

=TODAY()
        

This formula will display the current date, and it will automatically update whenever the spreadsheet is opened.

Step 2: The NOW Function

The NOW function returns the current date and time. It is similar to TODAY, but includes the time as well. This is helpful if you need to track the exact moment an event occurred.

Syntax:

NOW()
        

Example:

=NOW()
        

This will return the current date and time (e.g., 2025-08-09 14:30:00). Like the TODAY function, NOW updates every time the sheet is recalculated or opened.

Step 3: The DATE Function

The DATE function is used to create a date from individual year, month, and day values. This is useful when you have separate data points (e.g., year, month, and day) and you want to combine them into a single date.

Syntax:

DATE(year, month, day)
        

Example:

=DATE(2025, 8, 9)
        

This formula will return 2025-08-09.

Step 4: The DAY, MONTH, and YEAR Functions

The DAY, MONTH, and YEAR functions are used to extract specific components from a date. These functions can be helpful when you want to break down a date into its individual components.

DAY function:

DAY(date)
        

Example:

=DAY("2025-08-09")
        

This formula will return 9, the day of the month.

MONTH function:

MONTH(date)
        

Example:

=MONTH("2025-08-09")
        

This formula will return 8, the month (August).

YEAR function:

YEAR(date)
        

Example:

=YEAR("2025-08-09")
        

This formula will return 2025, the year.

Step 5: The DATEDIF Function

The DATEDIF function is used to calculate the difference between two dates in various units (e.g., days, months, or years). This is useful when you need to track the length of time between two events.

Syntax:

DATEDIF(start_date, end_date, unit)
        

unit can be one of the following:

  • "Y" – Years
  • "M" – Months
  • "D" – Days
  • "MD" – Days excluding months and years
  • "YM" – Months excluding years
  • "YD" – Days excluding years

Example:

=DATEDIF("2020-01-01", "2025-08-09", "Y")
        

This formula will return 5, which is the number of complete years between the two dates.

Step 6: The EDATE Function

The EDATE function returns a date that is a specified number of months before or after a given date. This is useful for calculating future or past due dates, such as due dates for invoices or subscriptions.

Syntax:

EDATE(start_date, months)
        

Example:

=EDATE("2025-08-09", 3)
        

This formula will return 2025-11-09, which is 3 months after August 9, 2025.

Step 7: The NETWORKDAYS Function

The NETWORKDAYS function returns the number of working days between two dates, excluding weekends (Saturday and Sunday). You can also specify holidays to exclude.

Syntax:

NETWORKDAYS(start_date, end_date, [holidays])
        

Example:

=NETWORKDAYS("2025-08-01", "2025-08-09")
        

This formula will return the number of working days (Monday to Friday) between August 1, 2025, and August 9, 2025.

Step 8: The WEEKDAY Function

The WEEKDAY function returns the day of the week for a given date as a number, where 1 represents Sunday, 2 represents Monday, and so on until 7 (Saturday).

Syntax:

WEEKDAY(date, [type])
        

Example:

=WEEKDAY("2025-08-09")
        

This formula will return 7, which represents Saturday. You can also change the [type] argument to customize the numbering system.

Conclusion

Google Sheets provides a wide array of date functions that can help you manage, calculate, and analyze dates in your spreadsheets. By using the functions outlined in this tutorial, you can easily perform tasks such as calculating the number of days between dates, extracting specific date components, and even handling working days and holidays. Mastering these essential date functions will make you more efficient in handling date-related tasks in Google Sheets.