Date Functions
Advanced

DATE from a yyyymmdd code

Cut the year, month and day out of a text code and rebuild a real date.

Task:

The bank file writes each value date as eight digits, such as 20240315. In B2:B6 turn each code into a real date.

Interactive Spreadsheet

Hints

+5 XPno-hints bonus

Solve it on your own to keep the bonus. Each hint gets one step closer to the formula.

The data in this exercise

This is the grid you start with. Cell references in the task — B6, C2 — point at the row numbers and column letters below.

6 rows × 2 columns5 cells you fill in
AB
1Value date (text)Date
220240315
320231231
420240229
520240701
620250110
What this exercise teachesMay contain the answer

Text functions cut the code apart and DATE assembles a real date that can be sorted, subtracted and filtered. DATE quietly converts the text pieces to numbers. Building the date from parts avoids any guessing about whether 03/04 means March or April.