Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can this be simplified?
Message
De
22/11/2018 19:54:49
 
 
À
22/11/2018 18:58:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01663691
Message ID:
01663720
Vues:
43
>PARAMETERS pd_date
>
>LOCAL lc_date
>
>IF TYPE("pd_date") = "C"
> pd_date = CTOD(pd_date)
>ENDIF
>
>lc_date = ALLTRIM(STR(YEAR(pd_date))) + "-" + ;
> PADL(ALLTRIM(STR(MONTH(pd_date))), 2, "0") + "-" + ;
> PADL(ALLTRIM(STR(DAY(pd_date))), 2, "0")
>
>RETURN lc_date

I don't have VFP in front of me. Would this work, or something like it?
RETURN TRANSFORM(DTOS(pd_date), "9999-99-99")
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform