SheetsLessons
Lesson 39 · Dates & Times

Dates: DATE, YEAR, MONTH, DAY & WEEKDAY

Learn how Google Sheets stores dates, then practise DATE, YEAR, MONTH, DAY, WEEKDAY, DAYS and DATEVALUE: build dates, pull them apart, count days and fix dates stored as text.

Task 1 of 6

Build a real date from the year, month and day in columns A to C. Put it in D2.

D2
fx

Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.

Dates are numbers in disguise

Google Sheets stores every date as a number: the count of days since December 30, 1899. January 1, 2026 is 46023. The date format just makes that number look like a date. This is why date math is simple: =B2-A2 is the number of days between two dates, and =A2+7 is a week later.

FunctionWhat it doesExample
DATE(year, month, day)Builds a date from its parts=DATE(2026, 3, 15)
YEAR, MONTH, DAYPull one part out of a date=MONTH(A2) → 3
WEEKDAY(date, [type])Day of the week as a number=WEEKDAY(A2, 2): Monday = 1
DAYS(end, start)Days between two dates=DAYS(B2, A2)
DATEVALUE(text)Turns date-looking text into a real date=DATEVALUE("2026-03-15")

Watch out for

  • DATE rolls over: month 13 is January of the next year and day 0 is the last day of the previous month. That's handy for "same day next month" maths.
  • A result that shows as 46096 instead of a date just needs date formatting: Format › Number › Date.
  • Imported dates are often text (they sit on the left of the cell). Sorting and date math won't work on them until you convert them with DATEVALUE.