Join date and time codes, skip zeros
Turn 20261104 and 143015 into November 4, 2026 2:30:15 PM. 00000000 stays blank.
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | A8="00000000" | Checks if the date code is all zeros. | FALSE |
| 2 | DATE( … ) | Reads the year, month and day as a real date. | November 4, 2026 |
| 3 | TIME( … ) | Adds the hour, minutes and seconds. | November 4, 2026 2:30:15 PM |
| 4 | IF( … ) | Leaves all zeros blank, otherwise shows parts 2 and 3. | November 4, 2026 2:30:15 PM |
Read it left to right. Some systems write 00000000 for a date nobody filled in, so it stays blank.
=IF(A8="00000000","",DATE(LEFT(A8,4),MID(A8,5,2),RIGHT(A8,2))+TIME(LEFT(B8,2),MID(B8,3,2),RIGHT(B8,2)))How to use it
Yellow bar at the top? Click Enable Editing.
- See it work. The Example tab shows 20 made-up examples with the formula already in.
- Use your own codes. Paste date codes like 20261104 into the first green column and time codes like 143015 into the second. The dates and times fill in by themselves.
- Move them into your letter. Copy the results. Then use Paste Special and choose Values.
Before you send
Keep both codes as text so leading zeros stay. A time of 000000 shows as midnight, so check it really means midnight.
Microsoft's help: DATE function
OTHER ROUTES YOU MIGHT LIKE

Read signed day-and-time interval text
-00 00:30:00.000000 → -0.020833 days
Get the template →
Convert year-month intervals to months
+02-03 → 27 months
Get the template →
Read timestamps wrapped in {ts}
{ts '2026-11-04 14:30:15'} → November 4, 2026 2:30:15 PM
Get the template →
Show an appointment time as 1:05 PM
13:05:00 → 1:05 PM
Take this route →