How to Build a Date with the DATE Function in Excel
Turn separate year, month and day numbers into a real Excel date, roll over month ends, and decode YYYYMMDD lot codes.
You will learn to
- Combine year, month and day columns into one date
- Use month overflow to jump to the next month
- Decode a compact YYYYMMDD code into a date
How it works
DATE(year, month, day) builds a real Excel date from three numbers. It is the go-to fix when a system exports the year, month and day in separate columns, because the result is a true date you can sort, filter and subtract.
DATE also normalises out-of-range values: month 13 becomes January of the next year and day 0 becomes the last day of the previous month. That makes formulas such as =DATE(B2,C2+1,1) (the first of next month) work all year round, including in December.
=DATE(B2,C2,D2)