How to Use the DATE Function in Excel

The DATE function is a versatile tool in both Microsoft Excel and Google Sheets, designed to construct a date from separate year, month, and day components. It is particularly valuable for generating dates dynamically, suited to specific conditions or calculations.

Syntax:

The syntax for the DATE function is consistent across both Excel and Google Sheets:

DATE(year, month, day)
  • year: a number that specifies the year (e.g., 2022).
  • month: a number between 1 and 12 that represents the month.
  • day: a number between 1 and 31 that denotes the day of the month.

Examples of Usage:

Here are some practical applications of the DATE function in Excel and Google Sheets:

Example 1: Basic Usage

To create a date specifying January 1, 2022, you would use the following formula:

Formula Result
=DATE(2022, 1, 1) 01/01/2022

Example 2: Date Calculations

The DATE function can also facilitate date calculations. For instance, to find the date 30 days after January 1, 2022, use:

Formula Result
=DATE(2022, 1, 1) + 30 01/31/2022

Example 3: Dynamic Dates

Generating dynamic dates based on today’s date is another common application. To obtain the first day of the current month, for example, you can use:

Formula Result
=DATE(YEAR(TODAY()), MONTH(TODAY()), 1) E.g., if today is April 15, 2022, the result will be 04/01/2022

These examples illustrate the flexibility and utility of the DATE function in managing and adjusting dates within your spreadsheets. By integrating it with other functions and formulas, you can efficiently manipulate date values to fit your requirements.

More information: https://support.microsoft.com/en-us/office/date-function-e36c0c8c-4104-49da-ab83-82328b832349

Other functions
Calculates the number of days, months, or years between two dates This function is useful in formulas where you need to calculate an age
Converts a date in the form of text to a serial number
Converts a serial number to a day of the month
Returns the number of days between two dates
Calculates the number of days between two dates based on a 360-day year
Returns the serial number of the date that is the indicated number of months before or after the start date
Returns the serial number of the last day of the month before or after a specified number of months
Converts a serial number to an hour
Returns the number of the ISO week number of the year for a given date
Converts a serial number to a minute
Converts a serial number to a month
Returns the number of whole workdays between two dates
Returns the number of whole workdays between two dates using parameters to indicate which and how many days are weekend days
Returns the serial number of the current date and time
Converts a serial number to a second
Returns the serial number of a particular time
Converts a time in the form of text to a serial number
Returns the serial number of today's date
Converts a serial number to a day of the week
Converts a serial number to a number representing where the week falls numerically with a year
Returns the serial number of the date before or after a specified number of workdays
Returns the serial number of the date before or after a specified number of workdays using parameters to indicate which and how many days are weekend days
Converts a serial number to a year
Returns the year fraction representing the number of whole days between start_date and end_date