Returns a number from 1 to 7 representing the day of the week of a date, where Sunday=1, Monday=2, and so on.
DOW( date-expression )
date-expression The value (of type DATE) to be evaluated.
SMALLINT
The DOW function is not affected by the value specified for the first_day_of_week database option. For example, even if first_day_of_week is set to Monday, the DOW function returns a 2 for Monday.
SQL/2008 Vendor extension.
The following statement returns the value 5.
SELECT DOW( '1998-07-09' ); |
The following statement returns the value 1.
SELECT DOW( CAST( '2010/05/30 11:33:00.000000+04:00' as TIMESTAMP WITH TIME ZONE )); |
The following statement queries the Employees table and returns the employees StartDate, expressed as the number of the day of the week:
SELECT DOW( StartDate ) FROM Employees; |
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |