TO_DAY_OF_MONTH (Lakehouse v1)
Convert a date or date with time (timestamp/datetime) to a UInt8 number containing the number of the day of the month (1-31).
Analyze Syntax
Section titled “Analyze Syntax”func.to_day_of_month(<expr>)Analyze Examples
Section titled “Analyze Examples”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 Syntax
Section titled “SQL Syntax”TO_DAY_OF_MONTH(<expr>)Arguments
Section titled “Arguments”| Arguments | Description |
|---|---|
<expr> | date/timestamp |
Aliases
Section titled “Aliases”Return Type
Section titled “Return Type”TINYINT
SQL Examples
Section titled “SQL Examples”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 │└──────────────────────────────────────────────────────────────────┘