Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange result using Week()
Message
De
24/08/2005 17:19:53
 
 
À
24/08/2005 16:04:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01043193
Message ID:
01043614
Vues:
6
>PMFJI, but 1/1/2004 week has 4 days in it. What do you get when you do 1/1/2005?

On MSSQL ?
1/1/2005 week #1
2/1/2005 week #2


>>I don't agree.
>>
>>MSSQL is not wrong.
>>The implementation of MSSQL is correct.
>>It is:
>>
>>- First week contains January 1st. ( Only this !)
>>- and return expected values:
>>- 2004-01-01 00:00:00.000   1
>>- 2004-12-31 00:00:00.000  53
>>
>>
>>This definition allow the week grouping.
>>It don't support ISO 8601,
>>no problem, the Team can add a datepart tag like w8601.
>>
>>On VFP and VB.NET is supported four definitions.
>>We consider that of default on VFP,
>>it is the same one of MSSQL and VB.NET (FirstWeekOfYear.Jan1):
>>
>>- First week contains January 1st.
>>- and return wrong values
>>- 2004-01-01   1
>>- 2004-12-31   1
>>
>>VFP apply the ISO 8601 rule ( a week have 7 days )
>>to the "First week contains January 1st",
>>and this is incorrect.
>>
>>This is a bug or a bad design,
>>and it makes incompatible VFP with MSSQL
>>and very difficult every week grouping in a VFP's sql query.
>>
>>Don't implement something it is not an error, to wrongly do it it is doubly wrong
>>because is simple add a new behaviour
>>but to change one wrong creates many problems.
>>
>>Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform