Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
First day of the week
Message
De
13/09/2004 06:35:10
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00941538
Message ID:
00941551
Vues:
7
You also have to ajust it to what one considers the first day In Europe the weeks starts on Monday
in the US on Sunday <s>

Peter


>Bernhar when I read Your first post more carefully I realise that You want to know the first day of the week of some date not the number of the day of the week:
>Try this (not tested):
>
> FUNCTION FirstDay(dDate)
>
> LOCAL ret_val
> IF DOW(dDate) == 1
>    ret_val = dDate - 6             && To make it Mondey not Sunday
> ELSE
>   ret_val = dDate - DOW(dDate) + 2 && To make it Mondey not Sunday
> ENDIF
>
>RETURN CDOW(ret_val) + " "+ DTOC(ret_val)
>
Peter Cortiel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform