Hello All,
I would like to calculate Week Number (each year has 52 weeks) and period during that week. First Day of the week is Sunday and last day is Saturday.
Example:
If I enter these days below:
Date:
01/01/2008
01/03/2008
01/15/2008
03/28/2008
07/01/2008
07/22/2008
09/27/2008
12/21/2008
12/27/2008
12/28/2008
12/31/2008
Output shoulb be:
Date Week Number Period
01/01/2008 1 01/01/08 - 01/05/08
01/03/2008 1 01/01/08 - 01/05/08
01/15/2008 3 01/13/08 - 01/19/08
03/28/2008 13 03/23/08 - 03/29/08
07/01/2008 27 06/29/08 - 07/05/08
07/22/2008 30 07/20/08 - 07/26/08
09/27/2008 39 09/21/08 - 09/27/08
12/21/2008 52 12/21/08 - 12/31/08
12/27/2008 52 12/21/08 - 12/31/08
12/28/2008 52 12/21/08 - 12/31/08
12/31/2008 52 12/21/08 - 12/31/08
Because each year should have 52 weeks only so, from 12/28/08 to 12/31/08 we should count them week 52 and from period 12/21/08 to 12/31/08 and so on on the next year.
So please help, I'm very appreciated. Thanks alots.
TN (USA). I'm using Windows XP, Access 2003, Crystal Reports 11 and SQL Server
I would like to calculate Week Number (each year has 52 weeks) and period during that week. First Day of the week is Sunday and last day is Saturday.
Example:
If I enter these days below:
Date:
01/01/2008
01/03/2008
01/15/2008
03/28/2008
07/01/2008
07/22/2008
09/27/2008
12/21/2008
12/27/2008
12/28/2008
12/31/2008
Output shoulb be:
Date Week Number Period
01/01/2008 1 01/01/08 - 01/05/08
01/03/2008 1 01/01/08 - 01/05/08
01/15/2008 3 01/13/08 - 01/19/08
03/28/2008 13 03/23/08 - 03/29/08
07/01/2008 27 06/29/08 - 07/05/08
07/22/2008 30 07/20/08 - 07/26/08
09/27/2008 39 09/21/08 - 09/27/08
12/21/2008 52 12/21/08 - 12/31/08
12/27/2008 52 12/21/08 - 12/31/08
12/28/2008 52 12/21/08 - 12/31/08
12/31/2008 52 12/21/08 - 12/31/08
Because each year should have 52 weeks only so, from 12/28/08 to 12/31/08 we should count them week 52 and from period 12/21/08 to 12/31/08 and so on on the next year.
So please help, I'm very appreciated. Thanks alots.
TN (USA). I'm using Windows XP, Access 2003, Crystal Reports 11 and SQL Server