TO_DAY_OF_MONTH(Lakehouse v1)
日付または日時(タイムスタンプ/datetime)を、月内の日番号(1~31)を表す UInt8 の数値に変換します。
Analyze 構文
Section titled “Analyze 構文”func.to_day_of_month(<expr>)Analyze の例
Section titled “Analyze の例”func.now(), func.to_day_of_month(func.now()), func.day(func.now())
┌──────────────────────────────────────────────────────────────────────────────────────┐│ func.now() │ func.to_day_of_month(func.now()) │ func.day(func.now()) │├────────────────────────────┼──────────────────────────────────┼──────────────────────┤│ 2024-03-14 23:35:41.947962 │ 14 │ 14 │└──────────────────────────────────────────────────────────────────────────────────────┘SQL 構文
Section titled “SQL 構文”TO_DAY_OF_MONTH(<expr>)| 引数 | 説明 |
|---|---|
<expr> |
日付/タイムスタンプ |
TINYINT
SQL の例
Section titled “SQL の例”SELECT NOW(), TO_DAY_OF_MONTH(NOW()), DAY(NOW());
┌──────────────────────────────────────────────────────────────────┐│ now() │ to_day_of_month(now()) │ day(now()) │├────────────────────────────┼────────────────────────┼────────────┤│ 2024-03-14 23:35:41.947962 │ 14 │ 14 │└──────────────────────────────────────────────────────────────────┘