Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A date from Week and Year?
Message
 
 
À
26/11/1999 10:51:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00295675
Message ID:
00295834
Vues:
21
>>Hello,
>>I have two values, the Week (like 48 for today) and the year (1999).
>>How can I get the date of the first day of this week?
>>So it should give me the date of last Sunday.
>>I did not find any function for this.
>
>lnWeek = 48
>lnYear = 1999
>?(DATE(lnYear,1,1) + (lnWeek-1) * 7) - DOW(DATE(lnYear,1,1) + (lnWeek-1) * 7) + 1


Wow, this one really works!
The case Week=1, Year=2000 was really tricky, but this code solves the problem.
Thanks for your help.
Christian Isberner
Software Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform