EPOCHTODATE in Google Sheets: Convert Unix Timestamps to UTC
Convert Unix seconds, milliseconds and microseconds to UTC in Google Sheets. Check matching timestamps and elapsed hours without guessing date offsets.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: Use =EPOCHTODATE(A2,1) for Unix seconds, 2 for milliseconds, or 3 for microseconds. The result represents UTC, not the spreadsheet’s local time zone. Google’s function reference.
Verification: Documentation reviewed October 21, 2026. The integer timestamp examples were independently checked with calendar arithmetic outside Google Sheets. No Google Sheets application execution, screenshot or import test is claimed. The manual serial-offset explanation in Google’s help remains inconsistent with its other date documentation, as explained below.
Syntax and unit selection
=EPOCHTODATE(timestamp, [unit])
timestamp is the Unix value. The optional unit identifies its scale: 1 means seconds, 2 milliseconds, and 3 microseconds. Omitting unit selects seconds. Do not type square brackets into a formula.
Read the exporting system’s field definition before choosing a unit. A column headed only “timestamp” is insufficient documentation. Keep the original value and its unit beside the result so someone else can reproduce the conversion.
Example 1: three encodings of the same instant
Create these headers: A1 Timestamp, B1 Unit, C1 UTC result. Enter the following original practice values and formulas:
| Row | A: Timestamp | B: Unit | C: Formula | Expected UTC display |
|---|---|---|---|---|
| 2 | 1704067200 | 1 | =EPOCHTODATE(A2,B2) |
2024-01-01 00:00:00 |
| 3 | 1704067200000 | 2 | =EPOCHTODATE(A3,B3) |
2024-01-01 00:00:00 |
| 4 | 1704067200000000 | 3 | =EPOCHTODATE(A4,B4) |
2024-01-01 00:00:00 |
The second input is 1,000 times the first; the third is 1,000,000 times the first. Those scale changes are canceled by their corresponding unit choices. All three represent the same instant, not three different dates.
Select C2:C4 and use Format > Number > Custom date and time to display the year, month, day, hours, minutes and seconds. Your locale may use different punctuation. Google’s date-formatting instructions.
Example 2: compare two events one hour apart
In E1:G3, enter this separate fixture:
| Cell | Entry |
|---|---|
| E1 | Event |
| F1 | Unix seconds |
| G1 | UTC result |
| E2 | Start |
| F2 | 1704067200 |
| G2 | =EPOCHTODATE(F2,1) |
| E3 | Finish |
| F3 | 1704070800 |
| G3 | =EPOCHTODATE(F3,1) |
Expected UTC results are 2024-01-01 00:00:00 and 2024-01-01 01:00:00. The raw timestamps differ by 3,600 seconds. In H2, =(F3-F2)/3600 independently checks that the elapsed interval is 1 hour without depending on a spreadsheet date-origin constant.
Do not relabel those UTC times as local times. A local-time conversion is a separate operation that needs a time-zone rule, including daylight-saving transitions where applicable.
Troubleshooting and the unresolved offset note
- The date is implausible: Recheck the source unit before changing the number. In particular, do not feed a millisecond value to the default seconds mode.
- Only a date or number appears: Check the result’s display format before treating it as a conversion failure.
- A negative timestamp fails: Google’s reference excludes negative inputs. This guide does not assert a particular error token.
- Sub-millisecond precision matters: The help describes shortened fractional milliseconds. These examples deliberately use whole seconds; finer precision has not been verified here.
- A copied manual conversion is one day different: Google’s EPOCHTODATE help mentions an additive constant of 25,568, but its zero-input example is January 1, 1970. Google’s DATE documentation establishes a December 30, 1899 date origin; the independently counted interval to January 1, 1970 is 25,569 days. These statements do not agree. This guide therefore does not recommend the help’s manual-offset formula or claim to have resolved the implementation through a native test.
Availability and compatibility
Google announced EPOCHTODATE on February 1, 2023, including personal Google accounts. The announcement records a rollout pause on February 22 and resumption on March 1, with Rapid and Scheduled Release domains expected to have access by March 14. These are rollout announcements, not a measured first-use date for every account. Google’s launch and updates.
This guide concerns the rolling Google Sheets web service. It does not establish equivalent function support in exported Excel files, offline applications or other spreadsheet programs. Keep original timestamps when moving data between systems so the conversion can be checked again.
Related guides
Use DATE when the year, month and day are separate inputs, and TIME for separate hour, minute and second inputs. TO_DATE addresses existing Sheets date serials, not Unix seconds. Return to the Google Sheets function reference for other date and time guides.