Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CAST Problem B... with multicasting invariance
Message
De
08/06/2004 22:17:47
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
 
 
À
08/06/2004 06:23:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Divers
Thread ID:
00911051
Message ID:
00911503
Vues:
21
Fabio,
I was reading the help file and the CAST Conversion from Character to Datetime is not Full but Partial.
You can get what you want this way:
t=DATETIME()
SET CENTURY OFF
?CAST(m.t AS D)=CAST(CAST(m.t AS C(8)) AS D)
or
t=DATETIME()
SET CENTURY ON
?CAST(m.t AS D)=CAST(CAST(m.t AS C(10)) AS D)
Peter

>Preface:
>If i apply a CAST sequence: CAST(CAST(CAST(...CAST(
>and all the intermediate CAST are
>F - given Full conversion without loss of
>I aspected that the result is the same one of that one obtained making a cast directed only one.
>
>VFP not respect this invariance rule.
>
>Example:
>
>CLEAR
>t=DATETIME()
>? CAST(m.t AS D)=CAST(CAST(m.t AS C(18)) AS D) && aspected true
>
>? 'DIRECT CAST T -> D'				,CAST(m.t AS D)
>? 'NO LOSS INTERMEDIATE CAST T -> C -> D'	,CAST(CAST(m.t AS C(18)) AS D)
>
>
>Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform