Apache Pinot Docs
Search…
latest
ToEpochRounded
This section contains reference documentation for the toEpochRounded functions.
Convert epoch milliseconds to epoch , round to nearest rounding bucket(Bucket size is defined in ) The following time units are supported:
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS

Signature

ToEpoch<TIME_UNIT>Rounded(timeInMillis, bucketSize)

Usage Examples

1
select ToEpochSecondsRounded(1613472303000, 1000) AS epochSeconds
2
FROM ignoreMe
Copied!
epochSeconds
1613472000
1
select ToEpochMinutesRounded(1613472303000, 10) AS epochMins
2
FROM ignoreMe
Copied!
epochMins
26891200
1
select ToEpochHoursRounded(1613472303000, 5) AS epochHours
2
FROM ignoreMe
Copied!
epochHours
448185
1
select ToEpochDaysRounded(1613472303000, 10) AS epochDays
2
FROM ignoreMe
Copied!
epochDays
18670
Last modified 1mo ago
Copy link