forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com> Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
6.2 KiB
6.2 KiB
day/dayofmonth
This function is used to return the day of a specified date.
Syntax
day(string date), dayofmonth(string date)
Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
date |
Yes |
DATE or STRING |
Date that needs to be processed The following formats are supported:
|
Return Values
The return value is of the INT type.
Example Code
The value 1 is returned.
select day('2023-08-01');
The value NULL is returned.
select day('20230816');
The value NULL is returned.
select day(null);
Parent topic: Date Functions