Features of !SEMTools

DATE

DATE function in Excel - formula examples
DATE function examples in Excel
Function categoryDate and time functions
VolatilityNon-volatile
Similar functionsTODAY, NOW, DATEVALUE

What does the DATE function do

The DATE function constructs a date from three numbers: year, month, and day. This is the most reliable way to create a correct date in Excel, especially when date components are in different cells.

=DATE(year,month,day)

When to use

  • When year, month, and day are in different cells or calculated by formulas
  • When building start and end dates for periods

Examples

Several simple examples.

1. Simple date

=DATE(2025,7,25)

Returns date 07/25/2025

2. Date from cells

=DATE(A1,B1,C1)

If A1 = 2025, B1 = 12, C1 = 31 → result: 12/31/2025

3. Last day of month

Day 0 of a month is interpreted by Excel as the last day of the previous month. In this sense, it serves as an alternative to the EOMONTH function.

=DATE(2024,2+1,0)

Alternatives

  • DATEVALUE(text) — if the date is given as text
  • TODAY() — current date
  • EOMONTH — end of month (current)

Errors and pitfalls

  • Month can be greater than 12 or less than 1 — Excel will recalculate the date. For example:
=DATE(2024,13,1)

Result: 01/01/2025

  • With negative values, Excel may return unexpected results
  • DATE always returns a date, even if the values are incorrect

Other Date and Time functions in Excel

TIMEVALUE, TIME, YEAR, DATEVALUE, EDATE, DAY, WEEKDAY, YEARFRAC, EOMONTH, MONTH, MINUTE, WEEKNUM and WEEKNUM.ISO, WORKDAY, DATEDIF, TODAY, SECOND, NOW, HOUR, NETWORKDAYS

Like the article? Help its author! Buy !SEMTools, it has lots of useful instruments to process text data.

This post is also available in RU.