Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can this be simplified?
Message
From
22/11/2018 19:54:49
 
 
To
22/11/2018 18:58:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01663691
Message ID:
01663720
Views:
42
>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")
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform