TO_HOURS (Lakehouse v1)
Convertit un nombre donné d’heures en type Interval.
- Accepte en entrée des entiers positifs, zéro et des entiers négatifs.
Syntaxe Analyze
Section intitulée « Syntaxe Analyze »func.to_hours(<hours>)Exemples Analyze
Section intitulée « Exemples Analyze »func.to_hours(2)┌──────────────────────────────────────────────────────┐│ func.to_hours(2) │├──────────────────────────────────────────────────────┤│ 2:00:00 │└──────────────────────────────────────────────────────┘Syntaxe SQL
Section intitulée « Syntaxe SQL »TO_HOURS(<hours>)Type de retour
Section intitulée « Type de retour »Interval (au format hh:mm:ss).
Exemples SQL
Section intitulée « Exemples SQL »SELECT TO_HOURS(2), TO_HOURS(0), TO_HOURS((- 2));
┌───────────────────────────────────────────┐│ to_hours(2) │ to_hours(0) │ to_hours(- 2) │├─────────────┼─────────────┼───────────────┤│ 2:00:00 │ 00:00:00 │ -2:00:00 │└───────────────────────────────────────────┘