DAYOFWEEK

 

The function DAYOFWEEK returns an integer in the range of 1 to 7. A value of 1 represents the Monday.

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

Examples:

  • SELECT DAYOFWEEK({d '2006-02-16'}), {fn dayofweek({d '2006-02-19'})}

    Returns: 4, 7

see also:
SQL Date Time Functions


100% pure Java DBMS
Mirror Site