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

TO_MILLENNIA



Converts a specified number of millennia into an Interval type.

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

Syntax

TO_MILLENNIA(<millennia>)

Return Type

Interval (represented in years).

Examples

SELECT TO_MILLENNIA(2), TO_MILLENNIA(0), TO_MILLENNIA((- 2)); ┌───────────────────────────────────────────────────────┐ │ to_millennia(2) │ to_millennia(0) │ to_millennia(- 2) │ ├─────────────────┼─────────────────┼───────────────────┤ │ 2000 years │ 00:00:00-2000 years │ └───────────────────────────────────────────────────────┘

Was this page helpful?