second
datetimeExtracts the second from a timestamp
Syntax
second(date) Parameters
date (timestamp) The timestamp value to extract the second from
Returns
number The second (0-59)
Examples
Input:
second("2024-03-15 14:30:45") Output:
45 Get the current second
Input:
second(now()) Output:
12 Extract second from a time field
Input:
.time | second Output:
0 The second() function extracts the second component from a timestamp value, returning a number from 0 to 59.
Usage
Use second() to work with high-precision timestamps, analyze sub-minute patterns, or extract time components for detailed temporal analysis.