DayOfWeek

Summary

The DayOfWeek function returns the day of the week as an integer value.

Syntax

DayOfWeek(<date|date_time|instant|offset_date_time|zoned_date_time>)

Return Type

Integer

Details

The returned value is in the range of 1 to 7, where 1 represents Sunday.

Examples

eval DayOfWeek(ToDate(‘2042-04-01’));

screen-shot-2016-09-21-at-9-24-07-am

 

select date1, DayOfWeek(date1), DayOfWeek(date_time1), DayOfWeek(offset_date_time1), DayOfWeek(zoned_date_time1) from AllTypes();

screen-shot-2016-09-21-at-9-24-02-am

Related Functions

DayName

DayOfMonth

DayOfYear

Month

Quarter

Week

Year