TO_HOURS (Lakehouse v1)
指定した時間数を Interval 型に変換します。
- 入力には、正の整数、ゼロ、負の整数を指定できます。
Analyze の構文
Section titled “Analyze の構文”func.to_hours(<hours>)Analyze の例
Section titled “Analyze の例”func.to_hours(2)┌──────────────────────────────────────────────────────┐│ func.to_hours(2) │├──────────────────────────────────────────────────────┤│ 2:00:00 │└──────────────────────────────────────────────────────┘TO_HOURS(<hours>)Interval(hh:mm:ss 形式)。
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 │└───────────────────────────────────────────┘