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

Comments

Popular posts from this blog

New CRM 2011 VM on PartnerSource

BizTalk Error: The adapter failed to transmit message going to send port

CRM 2011 together with the Scribe Adapter for CRM 4.0