maybe because the 29th is a different year? that would be the last week of the year not the first.
On Thu, Nov 13, 2008 at 11:49 AM, Duckster101 < [EMAIL PROTECTED]> wrote: > > I am trying to use the DatePart function to return the week number for > a specific date. I have been having difficulty getting it to return > the correct week number. > > When I use the DatePart function using all the same parameters except > the date, the function returns different results. > > For example: > > DatePart(DateInterval.WeekOfYear, CType("12/29/08", Date), > FirstDayOfWeek.Monday, FirstWeekOfYear.FirstFourDays) > Returns 53 > > DatePart(DateInterval.WeekOfYear, CType("1/3/09", Date), > FirstDayOfWeek.Monday, FirstWeekOfYear.FirstFourDays) > Returns 52 > > As you can see, the only thing different between these two functions > is the date that is passed. Both of these dates fall within the same > week, so why the difference in what it returns? >