Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange result using Week()
Message
 
 
À
24/08/2005 10:54:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01043193
Message ID:
01043683
Vues:
8
Fabio,

>All wrong.

Not really.

>Then who has not understood anything:
>those of the VFPT or those of the SQLTeam?

They are both correct, given their definitions of a week function. Who says there even needs to be any agreement between the VFP WEEK() function and a week function in SQL Server?

The VFP WEEK() function is an accounting people sort of function, their concept of a year only has a little to do with the year() of a date.

A WEEK() 1 is defined for a given year based on the second and third arguments, so the VFP function works quite correctly and gives the accountants exactly what they need to define their calendars, which don't have to agree with your interpretation of week numbers.

>After all, the formal correctness of MSSQL is not absolute,
>but it is not comparable with that of VFP (it doesn't have any global formal correctness)

So why to you keep holding MSSQL up as the absolute correct answer to every problem?

>Now, solve these problems:
>1. GROUP BY WEEK( ) within a Year.

It all depends on the definition of a "week" and a "year". Obviously the solution is dependent on the definition so there is no "one" answer to your stated problem.

The ISO standard you all are throwing around, is only one possible definition of a week. But just like there is no one definition of a fiscal year, there is no one definition of a week.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform