DATE Function – Create Date in Excel, VBA, Google Sheets

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on November 6, 2023
Download Example Workbook

Download the example workbook

This tutorial demonstrates how to use the Excel DATE Function in Excel to create a date.
DATE Main Function

DATE Examples

The DATE Function is used to create dates by entering a year, month, and day:

=DATE(B3,C3,D3)

DATE

Day and Month values can be zero:

DATE DM ZERO

or negative:

DATE DM Negative

DATE – DAY, MONTH, YEAR Functions

Often the Date Function is used along with DAY, MONTH, or YEAR Functions to calculate a date based on another date.

This example will return the first day of the year based on a given date:

=DATE(YEAR(B3),1,1)

First day of the year

Date Serial Numbers

The DATE Function will return a serial number representing a date:

=B3

DATE Serial number
DATE in Google Sheets

The DATE Function works exactly the same in Google Sheets as in Excel:

Date Google sheet

DATE Examples in VBA

You can also use the DATE function in VBA. Type:

application.worksheetfunction.date(year,month,day)

For the function arguments (year, etc.), you can either enter them directly into the function, or define variables to use instead.

Return to the List of all Functions in Excel

AI Formula Generator

Try for Free

Excel Practice Worksheet

practice excel worksheet

Practice Excel functions and formulas with our 100% free practice worksheets!

  • Automatically Graded Exercises
  • Learn Excel, Inside Excel!

Free Download

Return to List of Excel Functions