i had a problem how to set up the datepart exact date that i want: hers my example Code:
SET DATEFIRST 7;
select CAST(DATEPART(wk, '01/03/2010') AS CHAR(4)).. // 01/01/2010 to 01/03/2010 to return 1
how can i set the datepart if 01/03/2010 to 01/09/2010 returns = 1 and 01/10/2010 to 01/16/2010 returns to 2.. up to 53 weeks..