Skip to main content
Version: v5.1

minute

Extracts the minute component from a timestamp.

minute(x: time) -> int

Description

The minute function extracts the minute component from a timestamp as an integer (0-59).

x: time

The timestamp from which to extract the minute.

Examples

Extract the minute from a timestamp

from {
  ts: 2024-06-15T14:30:45.123456,
}
minute = ts.minute()
{
  ts: 2024-06-15T14:30:45.123456,
  minute: 30,
}

See Also

year, month, day, hour, second