Matt Leach Posted September 8, 2010 Posted September 8, 2010 (edited) We just recently imported all data from our old system into filemaker and have found an issue. Our old system stored the zip code as a number but displayed it as text. So the zip code would show up as 00802, but was stored as 802. Now that everything is in filemaker, i want to be able to automatically add the leading zeros so i can print mailings out. Im not quite sure how to accomplish this as the number of zeros to add would be different. For example: 802 i would have to add 2 zeros to make it 00802 8802 i would have to add 1 zero to make it 08802 Is there any type of calculation to accomplish this? Thanks Edited September 8, 2010 by Guest
Matt Leach Posted September 8, 2010 Author Posted September 8, 2010 Thank you very much for your help, does exactly what i needed.
Newbies serene Posted November 17, 2010 Newbies Posted November 17, 2010 I'm trying to do a similar thing, but with dates. examples: 1/1/1992 should become 01/01/1992 10/2/2010 should become 10/02/2010 I use Filemaker a lot, but know almost nothing about how to program or write scripts, etc. I have begun doing this manually, but there are 4,000 records with 3 date fields each, so if anyone could help me figure out how to do this, I'd be grateful. I will also continue RTFM and see if I can find what I need.
Newbies serene Posted November 17, 2010 Newbies Posted November 17, 2010 Our annual report to the feds goes into a web form they give us, and if even one leading zero is missing, they kick it back to us and say the report is not formatted correctly.
comment Posted November 17, 2010 Posted November 17, 2010 Our annual report to the feds goes into a web form they give us Please explain how this works.
Newbies serene Posted November 17, 2010 Newbies Posted November 17, 2010 Sure. We export our annual report's fields from our database to an Excel sheet, then upload it using their web upload. Some magic happens on their end, and they kick back whatever errors they've found (including the leading-zero error, but also other things that are less obvious.) Then we go fix the fields, re-export, re-upload, lather, rinse, repeat until they accept it. Sometimes this takes a full workday or more to complete.
comment Posted November 18, 2010 Posted November 18, 2010 Try either one of the following: 1. Quit Filemaker. Open System Preferences/Personal/International/Formats and set your short date format to MM/DD/YYYY (with leading zeros). Open your file. If asked, select "System's settings". Go to File/File Options.../Text and set the file to "Always use current system settings". Try exporting and see what you get. 2. Export a calculation field (result is Text) = SerialIncrement ( "00" ; Month ( YourDatefield ) ) & SerialIncrement ( "/00" ; Day ( YourDatefield ) ) & "/" & Year ( YourDatefield )
Newbies lhooq Posted April 29, 2014 Newbies Posted April 29, 2014 I'm trying to do a similar thing, but with dates. examples: 1/1/1992 should become 01/01/1992 10/2/2010 should become 10/02/2010 I use Filemaker a lot, but know almost nothing about how to program or write scripts, etc. I have begun doing this manually, but there are 4,000 records with 3 date fields each, so if anyone could help me figure out how to do this, I'd be grateful. I will also continue RTFM and see if I can find what I need. I know the last post here dates back a bit, but the subject is still valid and good. Lee Smith has the right answer, but you may want to take it up a notch for the dates and do something like this: Right ( "00" & Year ( "01/01/1992" ) ; 2 ) & "/" & Right ( "00" & Month ( "01/01/1992" ) ; 2 ) & "/" & Right ( "00" & Day ( "01/01/1992" ) ; 2 ) You will need to store your new date as text or else it will convert to whatever system settings you have in your system.
Lee Smith Posted April 29, 2014 Posted April 29, 2014 Your post here and the one about the Data Viewer are redundant to what has already been provide. BTW, the best answer to this question was the one provided by comment.
Recommended Posts
This topic is 3918 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now