A Unix timestamp counts the seconds since 1 January 1970 at 00:00 UTC; many APIs and event streams send milliseconds instead. epochDate converts seconds. For milliseconds, divide by 1,000 yourself.

Copy and paste

Seconds (10 digits today):

epochDate({Event Time})

Milliseconds (13 digits today):

epochDate(decimalToInt({Event Time Ms} / 1000))

A timestamp stored as text:

epochDate(parseInt({Event Time Text}))

Example

Value Unit Formula Result (UTC)
1778803200 seconds epochDate(...) 2026-05-15 00:00:00
1778851800 seconds epochDate(...) 2026-05-15 13:30:00
1778851800123 milliseconds epochDate(decimalToInt(... / 1000)) 2026-05-15 13:30:00
946684800000 milliseconds epochDate(decimalToInt(... / 1000)) 2000-01-01 00:00:00

Why divide explicitly

The documentation says that epochDate discards the digits after the tenth when the integer is longer than 10 digits. For a millisecond value from recent years (13 digits) that drops the last three and gives the right second, so epochDate({Event Time Ms}) seems to work.

It fails for older values. Milliseconds before 9 September 2001 have 12 digits or fewer, and dropping everything after the tenth digit then divides by 100, not 1,000. The value for 1 January 2000, 946684800000, would become 9466848000, a date in December 2269. Dividing by 1,000 is right for every date. decimalToInt turns the quotient back into the integer that epochDate requires.

SPICE only

AWS documents epochDate for analyses based on SPICE datasets. For a direct-query dataset, convert in the source query instead, for example from_unixtime(event_time) in Athena or TO_TIMESTAMP(event_time) in Snowflake, so that the dataset already has a date column.

Time zone

The result is in UTC. To show local time, set the analysis time zone under Edit → Analysis settings → Date and time → Convert time zone. QuickSight then converts the values, now() and relative date filters at query time, and handles daylight saving time. Don’t add or subtract a fixed number of hours in the formula: the offset changes twice a year.

Checked against the Amazon Quick Sight function reference (October 2026). The example results were recomputed in DuckDB.

References