DAY Function

Returns the numeric day of the month from a date or datetime value.

Category: Date and Time
Returned data type: TINYINT

Syntax

DAY(date | datetime)

Arguments

date

specifies any valid expression that represents a date value.

Data type DATE
See FedSQL Expressions

datetime

specifies any valid expression that represents a datetime value.

Data type TIMESTAMP
See FedSQL Expressions

Example

Table: CUSTONLINE
The following statement illustrates the DAY function:
Statements
Results
select day(endtime) from custonline;
1
2
15
1
1
2
16
1
1
15
select day(current_time);
17
Last updated: February 23, 2017