>Hi.
>1. Week(^{2005/01/01},3,2) Returns 52
>2. Week(^{2005/01/02},3,2) Returns 52
>3. Week(^{2005/01/03},3,2) Returns 1
>
>Surely 1 & 2 above are returning an incorrect week no.
>The second parameter indicates Seven Days, the third to start on a Monday
>
>Its probably because it considers it as Week 52 of last year (?) but the fact that I have 2005 in the year , should'nt this return a zero ?
I Agree, VFP is incorrect here, zero it is the correct choice.
Example:
SELECT ... GROUP BY WEEK()
>(.i.e the 1st and 2nd of Jan 2005 dont belong to any week IN 2005 if Monday 3rd is the first day of the year)
>
>Regards,
>
>Gerard