Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weeks in a year
Message
 
À
17/10/2006 16:51:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01162585
Message ID:
01162873
Vues:
20
>Certainly, but the problem is that I need a function that return the value of how many week have a year, and I can´t put the sometimes 30 days (for 2006)...and sometimes 31 days(in the case of year 2007). Need an automatic function.
>
>Thanks
>Carlos Burgos

And this is exactly my point: you need to apply your "week of the year" definition, and to use the appropriate formula.

One of the approaches is like this:
If you divide the number of days in the year by 7 (which is the number of days in the week) you get:

? 365/7 && 52 and 1/7

So, depending on the definition of the "week of year", one may consider the remaining one day (1/7 of the week) as the start of the new week inside the same year.

Sure the above does not take into account that the "week" must start from particular day, etc.
Again, use the formula that meet your business needs.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform