|
-
December 26th, 2008, 01:58 PM
#1
adding dashes back into the SSN
I need to add dashes back to my Social Security Number field. The field is a string in my SQL table.
When it comes into Crystal it comes out 123121234 but I want it to read 123-12-1234.
Is there a formula for this?
Crystal 8.5
Thanks
jake
-
December 27th, 2008, 08:57 AM
#2
Re: adding dashes back into the SSN
You would need to parse the field and store the results into three different variables.
start := left({field.name},3);
mid := mid({field.name},4,2);
end:= right({field.name},6);
result := start & "-" & mid & "-" & end;
May not be 100% correct since I don't have Crystal in front of me to test, but I use something close to this all of the time for phone numbers.
-
December 27th, 2008, 03:27 PM
#3
Re: adding dashes back into the SSN
Code:
left({field.name},3) + "-" + mid({field.name},4,2) + "-" + right({field.name},6)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|