Learn Excel
EN
Sets how numbers, dates and formulas look, so everything works just like your own Excel.

Home › Excel functions › DATE

DATE Function in Excel: Build and Fix Dates

DATE builds a real Excel date from a year, month and day. It's how you turn separate numbers or messy imported text into dates that sort, filter and calculate correctly.

In this guide
  1. DATE syntax
  2. Months and days that overflow
  3. Try it yourself
  4. YEAR, MONTH and DAY
  5. Convert text to dates
  6. Dates in formulas
  7. The year argument
  8. Add days, months and years
  9. In practice: dates from an export with separate columns
  10. Keep learning
  11. FAQ

DATE syntax

=DATE(year, month, day)

=DATE(2026, 11, 12) returns November 12, 2026. Always use a four-digit year: two-digit years are interpreted inconsistently.

Months and days that "overflow"

DATE rolls over automatically, which is very handy:

  • =DATE(2026, 13, 1) returns January 1, 2027.
  • =DATE(2026, 3, 0) returns February 28, 2026: day 0 is the last day of the previous month.
  • =DATE(2026, 1, 35) returns February 4, 2026.

DATE practice: try it yourself

Reading is one thing, typing it is another. Build the formula below step by step: the tips tell you what to type next, and you can click or drag across cells to add them, just like in Excel.

Task: Turn the year, month and day into one date, in D2: =DATE(A2,B2,C2)

Take a date apart: YEAR, MONTH and DAY

With a date in A2:

  • =YEAR(A2), =MONTH(A2) and =DAY(A2) return the parts as numbers.
  • First day of the month: =DATE(YEAR(A2), MONTH(A2), 1)
  • Same date next year: =DATE(YEAR(A2)+1, MONTH(A2), DAY(A2))
  • Add 3 months: =EDATE(A2, 3) is simpler, and handles month ends correctly. See also EOMONTH.

Convert text to real dates

Imported dates often arrive as text, like "20261112" or "12-11-2026". You can tell because they're left-aligned and don't sort correctly. Rebuild them with DATE and the LEFT, MID and RIGHT functions:

Text in A2Formula
20261112 (yyyymmdd)=DATE(LEFT(A2,4), MID(A2,5,2), RIGHT(A2,2))
12-11-2026 (dd-mm-yyyy)=DATE(RIGHT(A2,4), MID(A2,4,2), LEFT(A2,2))

Both return November 12, 2026 as a real date. For a whole column, Text to Columns with the column format set to Date (and the right order, such as DMY) is often quicker.

Dates inside other formulas

Typing a date as text inside a formula depends on regional settings. DATE avoids that:

=SUMIFS(C2:C100, A2:A100, ">="&DATE(2026,1,1))

See SUMIFS and COUNTIFS.

The year argument: always use four digits

DATE reads the year in its own way, and that catches people out with short years from an export:

  • 0 to 1899: Excel adds 1900. =DATE(26, 9, 15) returns September 15, 1926, not 2026.
  • 1900 to 9999: used as it is. =DATE(2026, 9, 15) returns September 15, 2026.
  • Below 0 or above 9999: the result is #NUM!.

Does your year column hold 26 instead of 2026? Add 2000 inside the formula: =DATE(2000+A2, B2, C2).

Add or subtract days, weeks, months and years

A date is a count of days, so days and weeks are plain addition. Months and years need EDATE or DATE. With a date in A2:

WhatFormula
10 days later=A2+10
3 weeks later=A2+3*7
5 days earlier=A2-5
2 months later=EDATE(A2, 2)
1 year later=DATE(YEAR(A2)+1, MONTH(A2), DAY(A2))

Watch the end of the month. With January 31, 2026 in A2, =DATE(YEAR(A2), MONTH(A2)+1, DAY(A2)) asks for February 31, and DATE rolls that over to March 3. =EDATE(A2, 1) stops at the last day of the month and returns February 28. The same goes for a year after February 29, 2028: DATE gives March 1, 2029, while =EDATE(A2, 12) gives February 28, 2029.

In practice: dates from an export with separate columns

Many systems export year, month and day in separate columns. Excel can't sort or filter those as dates until you put them together.

ABCDE
1YearMonthDayDateFirst of next month
2202631515 Mar 20261 Apr 2026
32026123131 Dec 20261 Jan 2027
42027188 Jan 20271 Feb 2027
  • D2: =DATE(A2, B2, C2)
  • E2: =DATE(A2, B2+1, 1)

Column E shows why DATE is handy beyond gluing parts together: month 12 + 1 is 13, and DATE turns that into January of the next year by itself.

Frequently asked questions

Why does DATE return a number instead of a date?

The cell is formatted as a number. Change it to a date format with Ctrl+1.

How do I get today's date?

Use =TODAY(). See TODAY and NOW.

How do I find the day of the week?

Use =TEXT(A2, "dddd") for the name ("Thursday") or =WEEKDAY(A2, 2) for a number from 1 (Monday) to 7 (Sunday).

How do I get the month of a date as a number?

Use =MONTH(A2): it returns 1 to 12. If you need two digits with a leading zero, such as 03, use =TEXT(A2, "mm"); the result is then text.

Can Excel work with dates before 1900?

Not as real dates: Excel's calendar starts on January 1, 1900, and DATE can't go back further. Type older dates as text. You can sort them if you write them as yyyy-mm-dd, but you can't calculate with them directly.