Jinith
Jinith

Reputation: 438

SQL Convert Month and Week Number to date

I know we can convert a date into a certain Week Number in SQL, can we do the reverse ? Eg : I have Year, Month name and a week number like (2017,February,Week 2).

Can we convert this into the first date of the week starting Sunday ? To give: 5-FEB-2017

Upvotes: 1

Views: 959

Answers (1)

Dexion
Dexion

Reputation: 1101

select DATEADD(Day,weekNumber*7,[first day of month])

Upvotes: 1

Related Questions