TO_CENTURIES (Lakehouse v1)
Converts a specified number of centuries into an Interval type.
- Accepts positive integers, zero, and negative integers as input.
Analyze Syntax
Section titled “Analyze Syntax”func.to_centuries(<centuries>)Analyze Examples
Section titled “Analyze Examples”func.to_centuries(2)┌──────────────────────────────────────────────────────┐│ func.to_centuries(2) │├──────────────────────────────────────────────────────┤│ 200 years │└──────────────────────────────────────────────────────┘SQL Syntax
Section titled “SQL Syntax”TO_CENTURIES(<centuries>)Return Type
Section titled “Return Type”Interval (represented in years).
SQL Examples
Section titled “SQL Examples”SELECT TO_CENTURIES(2), TO_CENTURIES(0), TO_CENTURIES(-2);
┌───────────────────────────────────────────────────────┐│ to_centuries(2) │ to_centuries(0) │ to_centuries(- 2) │├─────────────────┼─────────────────┼───────────────────┤│ 200 years │ 00:00:00 │ -200 years │└───────────────────────────────────────────────────────┘