Skip to content

Converts a specified number of minutes into an Interval type.

  • Accepts positive integers, zero, and negative integers as input.
func.to_minutes(<minutes>)
func.to_minutes(2)
┌──────────────────────────────────────────────────────┐
│ func.to_minutes(2) │
├──────────────────────────────────────────────────────┤
0:02:00
└──────────────────────────────────────────────────────┘
TO_MINUTES(<minutes>)

Interval (in the format hh:mm:ss).

SELECT TO_MINUTES(2), TO_MINUTES(0), TO_MINUTES((- 2));
┌─────────────────────────────────────────────────┐
│ to_minutes(2) │ to_minutes(0) │ to_minutes(- 2) │
├───────────────┼───────────────┼─────────────────┤
0:02:0000:00:00-0:02:00
└─────────────────────────────────────────────────┘