MONTH Function

Returns the numeric month from a date or datetime value.

Category: Date and Time
Returned data type: TINYINT

Syntax

MONTH(date | datetime)

Arguments

date

specifies any valid expression that represents a date value.

Data type DATE
See <sql-expression>
FedSQL Expressions

datetime

specifies any valid expression that represents a datetime value.

Data type TIMESTAMP
See <sql-expression>
FedSQL Expressions

Example

Table: CUSTONLINE
The following statement illustrates the MONTH function:
Statements
Results
select month(endtime) from custonline;
 9
10
10
11
12
 1
 1
 2
 3
 3
select month(current_time);
10