Read timestamp text with milliseconds

Turn the text 2026-11-04T14:30:15.123 into a real date and time with .123 seconds.

What you'll make

In Excel: 2026-11-04T14:30:15.123 becomes 11/4/2026 2:30:15.123 PM.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1DATE( … )Reads the year, month and day from the text.11/4/2026
2TIME( … )Reads the hours, minutes and seconds and adds them.… 2:30:15 PM
3MID(A8,21,3)Takes the 3 digits after the dot."123"
4/86400000Turns milliseconds into part of a day and adds it.… 2:30:15.123 PM

Read it left to right. A day has 86,400,000 milliseconds. A Z at the end is ignored.

=DATE(LEFT(A8,4),MID(A8,6,2),MID(A8,9,2))+TIME(MID(A8,12,2),MID(A8,15,2),MID(A8,18,2))+MID(A8,21,3)/86400000

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 timestamps like 2026-11-04T14:30:15.123 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

Times stay as written, so Z times stay in UTC. Keep the original text if you need every digit exactly.

Microsoft's help: MID function