Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add zero before a one digit number

Status
Not open for further replies.

veles

Technical User
Sep 1, 2006
57
CA
I have fields with numbers from 1 to 99 and I need help with a formula to have the field with an one digit number to add a zero in front only if it is a one digit number and not add a zero if it is a 2 digit number.
Example:
1.1.12 to be 01.01.12

All digits before and after the dots are from different number fields that I will concatonate.

Thanks for your help
 
Your formula should look like this:

totext({table.number1},"00")+"."+
totext({table.number2},"00")+"."+
totext({table.number3},"00")

-LB
 
Thank you very much. It worked like a charm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top