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!

Leading 0 and +

Status
Not open for further replies.

LauraW

IS-IT--Management
Mar 7, 2016
22
US
Hi,

I have a field that is a text field that needs to be formatted as a decimal. It's a pay rate field that can either be formatted like $12.50 or $32,000 depending on if the rate is hourly or salary.

When bringing the field (string) in straight from my database the field shows as follows:

000000080000000000+

I can remove the leading zero's but I can't seem to be able to format the last half of the field. This is point who I've gotten

totext(val({PERSACTION.NEW_VALUE_24}),0,"") Which will come out to 80000000000 but the value should show as 80,0000.00

If I change it to a number, it comes out like:

tonumber(val({PERSACTION.NEW_VALUE_24}))//,0,"") it comes out like 80,000,000,000.00. I'm sure the employee wouldn't mind making that much money but I still need it to show as 80,000.00

Can anyone help with this?
 

tonumber(val({PERSACTION.NEW_VALUE_24}))//,0,"")/100

Then use formatting to show the decimals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top