Apache Pinot Docs
Search…
latest
ToEpoch
This section contains reference documentation for the toEpoch functions.
Convert epoch milliseconds to epoch . The following time units are supported:
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS

Signature

ToEpoch<TIME_UNIT>(timeInMillis)

Usage Examples

1
select ToEpochSeconds(1613472303000) AS epochSeconds
2
FROM ignoreMe
Copied!
epochSeconds
1613472303
1
select ToEpochMinutes(1613472303000) AS epochMins
2
FROM ignoreMe
Copied!
epochMins
26891205
1
select ToEpochHours(1613472303000) AS epochHours
2
FROM ignoreMe
Copied!
epochHours
448186
1
select ToEpochDays(1613472303000) AS epochDays
2
FROM ignoreMe
Copied!
epochDays
18674
Last modified 1mo ago
Copy link