Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking field data
Message
From
10/03/2004 09:40:20
 
 
To
10/03/2004 09:33:39
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00884808
Message ID:
00884814
Views:
8
>My data arrives is two different formats:
>
>9999-99-999-9999
>and/or
>9999999999999
>
>1. How can I check to see which format it is arriving in?
>
>2. Based off the format that it arrives in, be able to appen 0's to those particular records that dont fill all the way (i.e. 123456, or 1234-56)

I think I would take it and always convert it down to one format
lc_data = "9999-99-999-9999"
lc_data = STRTRAN(lc_data, '-')
lc_data = PADR(lc_data, 13, '0')
lc_data = TRANSFORM(lc_data, '@R 9999-99-999-9999')
Of course you could combine multiple steps into one. But this is the way I would go about it. The STRTRAN won't do anyting for one's that don't contain a dash but atleast the data will be formated the same way each time.
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Previous
Reply
Map
View

Click here to load this message in the networking platform