Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange result using Week()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01043193
Message ID:
01043197
Vues:
9
>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.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

Gearad,
Second parameter means that count of the weeks starts with 1st week tha has 7 days. The 1st Jan of 2005 is satarday so the week is assumed as 52nd week of the 2004.
3th Jan is monnday so this is the first week of the 2005 according of that parameter.
Check WEEK function n help.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform