TO_CENTURIES (Lakehouse v1)
Converte um número especificado de séculos num tipo Interval.
- Aceita números inteiros positivos, zero e números inteiros negativos como entrada.
Sintaxe do Analyze
Seção intitulada “Sintaxe do Analyze”func.to_centuries(<centuries>)Exemplos do Analyze
Seção intitulada “Exemplos do Analyze”func.to_centuries(2)┌──────────────────────────────────────────────────────┐│ func.to_centuries(2) │├──────────────────────────────────────────────────────┤│ 200 years │└──────────────────────────────────────────────────────┘Sintaxe SQL
Seção intitulada “Sintaxe SQL”TO_CENTURIES(<centuries>)Tipo de Retorno
Seção intitulada “Tipo de Retorno”Interval (representado em anos).
Exemplos SQL
Seção intitulada “Exemplos SQL”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 │└───────────────────────────────────────────────────────┘