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!

number formatting 2

Status
Not open for further replies.

ganjass

Technical User
Dec 30, 2003
154
GB
CR 8

Hi I need to format numbers so that they are right justified with leading zero's to the length of 11 digits with no decimal place.

eg. 30.50 would be 00000003050
100.60 00000010060

Cheers

 
Try this:

replicatestring("0", 11 - len(replace(totext({table.field),".",""))) + replace(totext({table.field}),".","")

-dave
 
nargoyni cheers mate close but no cigar it does right justify the number but it forgets the number after the decimal,

vidru sweet as a nut it worked perfectly
 
Nagornyi's approach would work with the following modification:

totext({table.number} * 100, "00000000000")

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top