• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

are all us zip codes 5 digits?

Status
Not open for further replies.
Are all us zip codes 5 digits?

aka St. Louis 63102

I know there can be 63102-4567 but thats not what im talking about.. are there any 4 or 7 digit zips??
 
they are nine digits
ZIP + 4
In 1983, the U.S. Postal Service began using an expanded ZIP code system called "ZIP + 4", often called "plus-four codes", "add-on codes" or "add ons." The Postal Service has a "Find a ZIP Code" feature on its website, which provides an address format that is most compatible with its optical character recognition (OCR) scanners.
A ZIP + 4 code uses the basic five-digit code plus four additional digits to identify a geographic segment within the five-digit delivery area, such as a city block, a group of apartments, an individual high-volume receiver of mail or any other unit that could use an extra identifier to aid in efficient mail sorting and delivery. Initial attempts to promote universal use of the new format met with public resistance, and today the plus-four code is not required. In general, mail is read by a multiline optical character reader (MLOCR) that almost instantly determines the correct ZIP + 4 code from the address and—along with the even more specific delivery point—sprays a Postnet barcode on the face of the mailpiece that corresponds to 11 digits.
For post-office boxes, the general (but not invariable) rule is that each box has its own ZIP + 4 code. The add-on code is often one of the following: the last four digits of the box number (e.g., PO Box 58001, Washington DC 20037-8001), zero plus the last three digits of the box number (e.g., PO Box 12344, Chicago IL 60612-0344), or, if the box number consists of fewer than four digits, enough zeros prepended to the front of the box number to produce a four-digit number (e.g., PO Box 52, Garrett Park MD 20896-0052). However, there is no uniform rule, so the ZIP + 4 code must be looked up individually for each box.
It is common to use add-on code 9998 for mail addressed to the postmaster (to which requests for pictorial cancellations are usually addressed), 9999 for general delivery and other high-numbered add-on codes for business reply mail. For a unique ZIP code (explained below), the add-on code is typically 0001.
 
No offense, but your address parser is probably going to be broken. Instead of trying to reinvent it, I'd suggest finding one that already exists...
 
lol.. it almost works already. And one doesn't exist in the context I need it. I found a few entries in the zip db that were like 501 but thats only because it wasn't displaying the leading 00's, which threw me off.

It can already grab the zip out and find the city state.
 
Yes, although some start with 0.

And some start wih 00

IIRC the first zip code is 00510. A bitch when coding because the computer always wants to chop off leading zeros. Some software is friendly enough to accept just the 510, others assume you made an error so you have to add the leading zeros.
 
Some software is friendly enough to accept just the 510, others assume you made an error so you have to add the leading zeros.

SET @ZipCode = right('00000'+@ZipCode,5)

strZipCode = right("00000" & cstr(strZipCod),5)

function IsAZip(value) {
var re = /^\d{5}([\-]\d{4})?$/;
return (re.test(value));
}

bla bla bla
 
Status
Not open for further replies.
Back
Top