Uddyan Semwal
Uddyan Semwal

Reputation: 750

Set Monday is first day of week

I'm using Microsoft SQL server and in the SQL server by default first day of week is Sunday but I need to set it Monday is the first day of week.

Upvotes: 4

Views: 504

Answers (4)

Pierre
Pierre

Reputation: 844

You can use

SET DATEFIRST { number }
Number Day
1 Monday
2 Tuesday
3 Wednesday
4 Thursday
5 Friday
6 Saturday
7 Sunday

Upvotes: 4

Shadiqur
Shadiqur

Reputation: 492

This sets the first day of the week to Monday

SET DATEFIRST 1;

Upvotes: 4

TheWildHealer
TheWildHealer

Reputation: 1626

Use this command :

SET DATEFIRST 1;

See this post

Upvotes: 2

PSK
PSK

Reputation: 17943

You can use SET DATEFIRST like following.

SET DATEFIRST 1

You can read more about this here and here

Upvotes: 3

Related Questions