Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert Date
Message
From
24/09/2008 12:59:47
 
 
To
23/09/2008 20:38:08
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01350071
Message ID:
01350237
Views:
23
>>>Is there a simple way to convert this:
>>>
>>>"2002/01/23"
>>>
>>>to this?
>>>
>>>"01/23/2002"
>>>
>>>It actually starts out as this:
>>>
>>>"20020123"
>>>
>>>If that matters.
>>
>>How about
>>ab="20020123"
>>SET CENTURY on
>>SET DATE american
>>? CTOD(TRANSFORM(ab,"@R ^9999-99-99"))
>
>How can I work that into this?
>
>NewFormatValue = EVALUATE("ALLTRIM(TRANSFORM(CHRTRAN(FormatValue,CharactersToStrip,''), '@R ####/##/##'))")
>
>Where FormatValue is:
>
>"20020123"
>
>I'm not trying to get the date, but rather the text value.


To get the result as a character string (I missed that part of it) you could modify it to
>>
? DTOC(CTOD(TRANSFORM(ab,"@R ^9999-99-99")))
To work it into your line of code how about something like..........
? DTOC(CTOD(EVALUATE("ALLTRIM(TRANSFORM(CHRTRAN(FormatValue,CharactersToStrip,''), '@R ^####/##/##'))")))
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform