Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining the start and end dates of a given week
Message
De
08/12/2003 06:01:08
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Determining the start and end dates of a given week
Divers
Thread ID:
00856775
Message ID:
00856775
Vues:
60
Hi,

How can I determine the dates of the first and the last days in a week, given the week number, the year and the month where it occurs?

Examples:
December, 2003, week #50: first day's date: dec,  7, 2003
                          last  day's date: dec, 13, 2003

December, 2003, week #51: first day's date: dec, 14, 2003
                          last  day's date: dec, 20, 2003

December, 2003, week #52: first day's date: dec, 21, 2003
                          last  day's date: dec, 27, 2003

December, 2003, week #01: first day's date: dec, 28, 2003 (this week is split between two months, and years)
                          Last  day's date: jan, 03, 2004
                          
January , 2004, week #01: first day's date: dec, 28, 2003 (see example above)
                          Last  day's date: jan, 03, 2004
                          
January , 2004, week #02: first day's date: jan, 04, 2003
                          Last  day's date: jan, 10, 2004
Note: To determine the number of a week, given a date, I'm using: nWeek = Week (dGivenDate, 1, 1) (First week contains January 1st, first day of week is Sunday).

Thanks for any help,

Fernando
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform