DAYOFWEEK

Returns the day of the week as an integer, where Sunday is day 1.

Behavior Type

Syntax

DAYOFWEEK ( date )

Parameters

date

The date to process, one of the following data types:

Example

=> SELECT DAYOFWEEK (TIMESTAMP 'sep 17, 2011 12:34');
 DAYOFWEEK
-----------
         7
(1 row)