Skip to main content
VeloDB Cloud 4.x is based on Doris 3.x. Versions in this section refer to Doris versions. See Version Mapping.

DAY

Description​

Obtain the day information from the date, with return values ranging from 1 to 31.

Alias​

  • dayofmonth

Syntax​

DAY(<dt>)

Parameters​

ParameterDescription
<dt>A valid date expression

Return Value​

Returns the day information from the given date.

Examples​

select day('1987-01-31');
+----------------------------+
| day('1987-01-31 00:00:00') |
+----------------------------+
| 31 |
+----------------------------+