Skip to main content

TO_CENTURIES

Introduced or updated: v1.2.677

Converts a specified number of centuries into an Interval type.

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

Syntax

TO_CENTURIES(<centuries>)

Return Type

Interval (represented in years).

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 │
└───────────────────────────────────────────────────────┘
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today