Read long Unix time codes kept as text
Turn 1793802615123456 microseconds into 11/4/2026 2:30:15.123 PM UTC.
Download Excel templateMicrosoft 365
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | IF(LEN(A8)>n, … ,"0") | All but the last n digits, or 0. LET calls it w. | "1793802615" |
| 2 | RIGHT(REPT("0",n)&A8,n) | The last n digits, the part of a second. LET calls it f. | "123456" |
| 3 | DATE(1970,1,1)+VALUE(w)/86400 | Adds the whole seconds to January 1, 1970. | 11/4/2026 2:30:15 PM |
| 4 | VALUE(f)/(86400*10^n) | Adds the last digits as part of a second. | … 2:30:15.123 PM |
| 5 | LET( … ) | Names each step so the formula reads in order. | … 2:30:15.123 PM |
LET calls the unit in B8 n: 6 for microseconds, 9 for nanoseconds. The cell shows 3 of the digits.
=LET(n,B8,w,IF(LEN(A8)>n,LEFT(A8,LEN(A8)-n),"0"),f,RIGHT(REPT("0",n)&A8,n),DATE(1970,1,1)+VALUE(w)/86400+VALUE(f)/(86400*10^n))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 codes like 1793802615123456 and their unit, 6 or 9, into the green columns of the Template tab. 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
Paste the codes as text. Typed as a number, Excel turns the last digits into zeros.
Microsoft's help: VALUE function
OTHER ROUTES YOU MIGHT LIKE

Read compact elapsed time like 493015
493015 → 49:30:15, not 1:30:15
Get the template →
Read duration text with 7 decimal places
-2.01:30:15.5000000 → -2.062679 days
Get the template →
Read a timestamp only if it ends in GMT
Wed, 04-Nov-2026 14:30:15 GMT → 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 →