Skip to main content

TODAYOFMONTH

Converts a date or date with time to a UInt8 number containing the number of the day of the month (1-31).

Syntax

toDayOfMonth(expr)

Arguments

ArgumentsDescription
exprdate32/date64/datetime

Return Type

UInt8 datatype.

Examples

SELECT toDayOfMonth(toDate(18869));
+-----------------------------+
| toDayOfMonth(toDate(18869)) |
+-----------------------------+
| 30 |
+-----------------------------+

SELECT toDayOfMonth(toDateTime(1630812366));
+--------------------------------------+
| toDayOfMonth(toDateTime(1630812366)) |
+--------------------------------------+
| 5 |
+--------------------------------------+