Extracts the second component from a timestamp with subsecond precision.
second(x: time) -> float
Description
Section titled “Description”The second
function extracts the second component from a timestamp as a
floating-point number (0-59.999…) that includes subsecond precision.
x: time
Section titled “x: time”The timestamp from which to extract the second.
Examples
Section titled “Examples”Extract the second from a timestamp
Section titled “Extract the second from a timestamp”from { ts: 2024-06-15T14:30:45.123456,}second = ts.second()
{ ts: 2024-06-15T14:30:45.123456, second: 45.123456,}
Extract only the full second component without subsecond precision
Section titled “Extract only the full second component without subsecond precision”from { ts: 2024-06-15T14:30:45.123456,}full_second = ts.second().floor()
{ ts: 2024-06-15T14:30:45.123456, full_second: 45,}