Get Week Number in SQL Server
It happens frequently that certain clients want to see the weeknumber of certain dates in CRM reports.
To accomplish this, you can use the following function in your query to get the week number for a given date:
select datepart(ww,scheduledstart) from filteredappointment
The above query will give you the weeknumber of the scheduled start date from the filtered appointments view.
Kevin Dosseray
To accomplish this, you can use the following function in your query to get the week number for a given date:
select datepart(ww,scheduledstart) from filteredappointment
The above query will give you the weeknumber of the scheduled start date from the filtered appointments view.
Kevin Dosseray
Comments
Post a Comment