Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement