Skip to content

Converts a specified number of millennia into an Interval type.

  • Accepts positive integers, zero, and negative integers as input.
func.to_millennia(<millennia>)
func.to_millennia(2)
┌──────────────────────────────────────────────────────┐
│ func.to_millennia(2) │
├──────────────────────────────────────────────────────┤
2000 years │
└──────────────────────────────────────────────────────┘
TO_MILLENNIA(<millennia>)

Interval (represented in years).

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