>I have a couple of questions. I am importing call detail records into a foxpro table. The fields are destination phone number, originating phone number, and minutes for each call.
>The problem is that the phone numbers do not have dashes in them, which i need. Is there anyway to insert dashes after the data is already in the table? I tried using the input mask (set to 999-999-9999), and it put in dashes, but cut off digits.
>The other problem is that the minutes in the call detail record are in a format where a decimal is assumed (example 14 would be 1.4 minutes). Is there a way I can change all of them once they are in a foxpro table so they show the decimal? Maybe like multiply all records in the minutes field by .1 ?
>
>Thank you,
>Ryan
In addition to what Trey said, these fall in the category of VFP's million and one ways to do most anything:
replace myfield with transform(myfield,"@R 999-999-9999")
replace myfield with substr(myfield,1,3)+'-'+substr(myfield,4,3)+'-'+substr(myfield,7)
replace myfield with left(myfield,3)+'-'+substr(myfield,4,3)+'-'+right(myfield,4)
Personally, I like option 1.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao