Extracts the hour component from a timestamp.
hour(x: time) -> int
Description
Section titled “Description”The hour
function extracts the hour component from a timestamp as an integer
(0-23).
x: time
Section titled “x: time”The timestamp from which to extract the hour.
Examples
Section titled “Examples”Extract the hour from a timestamp
Section titled “Extract the hour from a timestamp”from { ts: 2024-06-15T14:30:45.123456,}hour = ts.hour()
{ ts: 2024-06-15T14:30:45.123456, hour: 14,}