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

Right-Justify AND zero fill to the left

Status
Not open for further replies.

doowle

Technical User
Jun 10, 2009
2
US
I am having trouble with getting a field to right-justify and fill empty any spaces to the left with zeros.

example: (always an 11 character field) when entering 1234.12, I need the data in the field to be 00001234.12 or if entering 123456.12, then I need the field to contain 00123456.12 instead.

It's easy to accomplish this in the format field, I just enter !*0 in the format box and the result looks exactly like what I am looking for. HOWEVER, I need to be able to Export to Text File the data and have it export as formatted, with the zeros to the left of the number. (Unfortunately Format of course only changes display formatting, not the actual data in the field).

Anyone know how to make the data actually fill the field as indicated in example above?

Thanks!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top