Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DTOS and CENTURY Question
Message
 
 
À
20/08/2008 15:01:45
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01340482
Message ID:
01340487
Vues:
11
DTOS() function always returns 4 digits for the year regardless on the CENTURY settings otherwise how would we use DTOS in indexes? You need to use different TRANSFORM functions.


>These two CASE conditions return "20051013" as the NewFieldValue, regardless of the CENTURY setting. It is a function in a SQL statement column, if that matters.
>
>The value of FieldValue is:
>
>{^2005/10/13}
>
>					CASE EligCrit.FormatVal = 'YYYYMMDD'
>						SET CENTURY ON
>						NewFieldValue = STRTRAN( DTOS( FieldValue ), '/', '' )
>
>					CASE EligCrit.FormatVal = 'YYMMDD'
>						SET CENTURY OFF
>						NewFieldValue = STRTRAN( DTOS( FieldValue ), '/', '' )
>
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform