TO_MILLENNIA (Lakehouse v1)
Converts a specified number of millennia into an Interval type.
- Accepts positive integers, zero, and negative integers as input.
Analyze Syntax
Section titled “Analyze Syntax”func.to_millennia(<millennia>)Analyze Examples
Section titled “Analyze Examples”func.to_millennia(2)┌──────────────────────────────────────────────────────┐│ func.to_millennia(2) │├──────────────────────────────────────────────────────┤│ 2000 years │└──────────────────────────────────────────────────────┘SQL Syntax
Section titled “SQL Syntax”TO_MILLENNIA(<millennia>)Return Type
Section titled “Return Type”Interval (represented in years).
SQL Examples
Section titled “SQL 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 │└───────────────────────────────────────────────────────┘