Link to home
Start Free TrialLog in
Avatar of Becky Edwards
Becky EdwardsFlag for United States of America

asked on

Make 9 digit zip code a 5 digit zip code

Is there a function that takes a zip code field that is currently XXXXX-XXXX and automatically
formats it to XXXXX?
If not, what could I put in the formula so that Crystal only sees, and groups by, the first five
digits only?
Avatar of Christopher Gordon
Christopher Gordon
Flag of United States of America image

LEFT function in T-SQL:

select left(zipcodeField,5) as ZipCode
ASKER CERTIFIED SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Becky Edwards

ASKER

Worked perfect.  Thanks!
Avatar of Mike McCracken
Mike McCracken

ANother way would be to use the split command

Split({YourField},'-')[1]

mlmcc
Thanks mlmcc!