DAYOFWEEK()

Scalar. Returns an integer representing the day of the week (1 is Sunday) as extracted from a timestamp value.

Syntax

DAYOFWEEK( timestamp [, timezone ] )
Parameters

timestamp

An expression that evaluates to a timestamp value.

timezone

A string representing the time zone. If omitted, Sybase CEP Engine assumes the local time zone. See "Sybase CEP Time Zone Database" in the Sybase CEP Integration Guide for more information about valid time zone strings.

Data Types

Return

timestamp

timezone

Integer

Timestamp

String

Usage

If either parameter is NULL, the function returns NULL.

Example

INSERT INTO OutStream
SELECT DAYOFWEEK(InStream.OrderTime)
FROM InStream;