Zip Code - maintaining leading zeros
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am having a problem reading in zip code data into Alteryx. It is auto assigning the Double value by default which strips the leading zeros from the zip code. I have tried converting to v_string, but the leading zeros are missing. How does one keep the leading zeros on a zip code, or put them back on if they have been stripped off by Alteryx?
Thanks in advance for your help.
Solved! Go to Solution.
- Labels:
- Datasets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @lmaughan
You can use PadLeft()
PadLeft([Field1, 6, "0")
Here 6 is the required length. It will add "0"s to bring it to length 6.
Can you provide some sample data and expected zip codes for it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank all for your recommendations -- this works!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello - when generating CSV files, the file format removes the leading 0's. Is there a way to special format an output so that the text is in zipcode/postcode format?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Did you find a solution to this? Thanks
