📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

TO_MINUTES



Converts a specified number of minutes into an Interval type.

  • Accepts positive integers, zero, and negative integers as input.

Syntax

TO_MINUTES(<minutes>)

Return Type

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

Examples

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 │ └─────────────────────────────────────────────────┘

Was this page helpful?