DATE Function – Create Date in Excel, VBA, Google Sheets
Written by
Reviewed by
Download the example workbook
This tutorial demonstrates how to use the Excel DATE Function in Excel to create a date.
DATE Examples
The DATE Function is used to create dates by entering a year, month, and day:
=DATE(B3,C3,D3)
Day and Month values can be zero:
or 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)
Date Serial Numbers
The DATE Function will return a serial number representing a date:
=B3
DATE in Google Sheets
The DATE Function works exactly the same in Google Sheets as in Excel:
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