Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Week 53 of 2009 and week 1 of 2010 problem.

$
0
0
Hi There, I have a problem with the datepart (Week,date) function in that the results for the end of the year are as follows.

Date	Week Ending (Friday)	Datepart - Week
27/12/09	01/01/10	                                 53
28/12/09	01/01/10	                                 53
29/12/09	01/01/10	                                 53
30/12/09	01/01/10	                                 53
31/12/09	01/01/10	                                 53
01/01/10	01/01/10	                                 1
02/01/10	08/01/10	                                 1
03/01/10	08/01/10	                                 2
04/01/10	08/01/10	                                 2
05/01/10	08/01/10	                                 2
06/01/10	08/01/10	                                 2
07/01/10	08/01/10	                                 2
08/01/10	08/01/10	                                 2
09/01/10	15/01/10	                                 2

This may just be a cultural thing but I would have expected (and require) week 53 to continue as a full week and week 1 to be the first full week of the new year, in this example week 53 and week 1 are the same week which will throw so many of my figures out. I'm not necessarily looking for a solution here because I'll just build my own date table. I just thought I'd mention it to see if anyone else has had the same problem and solved it in a more dynamic way than just building a new table.

Thanks.

Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>