I need to split a report by work week, and our work week is Saturday through Friday. How would I convert an ISO week from DATEPART(WW, ) into a work week开发者_如何转开发?
Use SET DATEFIRST to be saturday:
SET DATEFIRST 6;
Check the DATEPART documentation regarding the ISO week for how this affects things.
SET DATEFIRST 6
精彩评论