Quantcast
Channel: .NET Mixer
Viewing all articles
Browse latest Browse all 25

How to get week number from a date in SQL Server

$
0
0
As a developer i beleive that most of the times we need to built our query based on date column. Some times we need to get or find out the week number from a given date. Sql server provides us such an easy way to find out the week number from a date. The function is DATEPART. By using DATEPART function we can calculate week number easily. Please follow my example code to achieve the expected

Viewing all articles
Browse latest Browse all 25