Read a yyyymmdd hhmmss timestamp

Turn the code 20261104 143015 into a real date and time: November 4, 2026 2:30:15 PM.

What you'll make

In Excel: 20261104 143015 becomes November 4, 2026 2:30:15 PM.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1DATE( … )Reads the year, month and day as a real date.November 4, 2026
2TIME( … )Adds the hour, minutes and seconds after the space.November 4, 2026 2:30:15 PM

LEFT, MID and RIGHT take digits by position. The year starts at 1, the month at 5, the hour at 10.

=DATE(LEFT(A8,4),MID(A8,5,2),MID(A8,7,2))+TIME(MID(A8,10,2),MID(A8,12,2),RIGHT(A8,2))

How to use it

Yellow bar at the top? Click Enable Editing.

  1. See it work. The Example tab shows 20 made-up examples with the formula already in.
  2. Use your own codes. Paste codes like 20261104 143015 into the green column of the Template tab. The dates and times fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Check each code has 8 digits, a space, then 6 digits. An impossible part, like day 31 in November, rolls into the next day without a warning.

Microsoft's help: TIME function