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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal String Formula

Status
Not open for further replies.

Honyo

IS-IT--Management
Dec 26, 2002
19
CA
Hi

I currently have a string field with a length of 9 characters. If the length is less than 9, then I need to add zeros to the front of data.
E.g. 45678 will become 000045678

I need the formula to get the length of the string and with anything less than 9, it adds the 0. Sounds easy, I know, but my brain has been twisted into knots with this.

Please help.

Regards
Honyo
 
Try something Like:

right("000000000" & yournumber,9)

Yournumber is assumed to be a chararter string (Or converted to one)..

Rich

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top