DATE_FIRST_DAY_OF_WEEK option

Function

Determines the first day of the week.

Allowed values

0 – 6

Default

0 (Sunday)

Scope

DBA permissions are not required to set this option. Can be set temporary, for an individual connection, or for the PUBLIC group. Takes effect immediately.

Description

This option can specify which day is the first day of the week. By default, Sunday is day 1, Monday is day 2, Tuesday is day 3, and so on. Table 2-9defines the valid values for the DATE_FIRST_DAY_OF_WEEK option.

Table 2-8: DATE_FIRST_DAY_OF_WEEK values

Value

First Day

0

Sunday

1

Monday

2

Tuesday

3

Wednesday

4

Thursday

5

Friday

6

Saturday

For example, if you change the value for the DATE_FIRST_DAY_OF_WEEK option to 3, Wednesday becomes day 1, Thursday becomes day 2, and so on. This option only affects the DOW and DATEPART functions, so its effect is quite narrow.

See also

The Adaptive Server Anywhere option FIRST_DAY_OF_WEEK performs the same function but assigns the values 1 through 7 instead of 0 through 6. 1 stands for Monday and 7 for Sunday (the default). If you receive unexpected results, see Ordering query results in Sybase IQ Performance and Tuning Guide.