Check timestamp text with milliseconds

Turn this text into a real date and time only if it has exactly three digits after the dot.

What you'll make

In Excel: 2026-11-04T14:30:15.123 becomes 11/4/2026 2:30:15.123 PM, but .12 becomes Review timestamp.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1DATEVALUE( … )Reads the first 10 characters as a date.11/4/2026
2TIMEVALUE( … )Reads the clock time and adds it.… 2:30:15 PM
3MID(A8,21,3)/86400000Adds the 3 digits after the dot. LET calls it all x.… 2:30:15.123 PM
4AND( … )Checks x writes back as the exact same text.TRUE
5IFERROR(LET( … ))Shows x, or Review timestamp if anything fails.11/4/2026 2:30:15.123 PM

A day has 86,400,000 milliseconds. 15.12 writes back as 15.012, so it fails.

=IFERROR(LET(x,DATEVALUE(LEFT(A8,10))+TIMEVALUE(MID(A8,12,8))+MID(A8,21,3)/86400000,IF(AND(YEAR(x)>=1901,TEXT(x,"yyyy-mm-dd""T""hh:mm:ss.000")=A8),x,"Review timestamp")),"Review timestamp")

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

Keep the original text too. Excel stores times with tiny rounding, so the text is the exact record.

Microsoft's help: TEXT function