MONTH

 

The function MONTH returns an integer in the range of 1 to 12. This integer represent the count of month since beginning of the month. If you use it with a time value then it return ever 1.

SQL Syntax:
 
   MONTH( date )
Date:
 
  Any date expression.
Escape Syntax:
 
  {fn MONTH( date )}
Return Type:
 
  INT
     

Examples:

  • SELECT MONTH({d '2006-01-01'}), {fn month({d '2004-12-31'})}

    Returns: 1, 12

see also:
SQL Date Time Functions
DAYOFMONTH
DAYOFYEAR


100% pure Java DBMS
Mirror Site