Read a timestamp with a century prefix

Turn 04-NOV-26 02.30.15.123456 PM and the century 20 into 11/4/2026 14:30:15.123.

What you'll make

In Excel: 04-NOV-26 02.30.15.123456 PM + 20 becomes 11/4/2026 14:30:15.123.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1DATEVALUE( … )Puts the century before the 2-digit year and reads the date.11/4/2026
2SUBSTITUTE( … )Takes the clock and swaps each dot for a colon."02:30:15"
3TIMEVALUE( … )Adds AM or PM, reads the clock time and adds it.… 14:30:15
4MID( … )/86400000000Adds the 6 digits after the dot as part of a second.… 14:30:15.123

Read it left to right. Part 1 uses the century in B8. Part 2 sits inside part 3, which also takes AM or PM from the end.

=DATEVALUE(LEFT(A8,7)&B8&MID(A8,8,2))+TIMEVALUE(SUBSTITUTE(MID(A8,11,8),".",":")&" "&RIGHT(A8,2))+MID(A8,20,6)/86400000000

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 timestamps. Paste text like 04-NOV-26 02.30.15.123456 PM and its century, like 20, into the green columns 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

Choose the century for each row yourself: 19 turns 98 into 1998, and 20 turns 26 into 2026. Don't let Excel guess it.

Microsoft's help: DATEVALUE function