dudeatwork

asked on

# How do I convert a number to a percent?

I want to take a number say 65 and turn it into .65

I have tried many ways but I just can't seem to get it.

I have different totals and every employee has different percents they get from the total. So I tried

<cfset mytotal = (#paidamt# * #mypercent#)> and it didn't work because it still saw 65 not .65

I tried

<cfset mytotal = (#paidamt# * ".#mypercent#)> and it gave me a value of 0 or it errored. How do I change a number to a percent? 65 to .65? Thanks.

Jeff

I have tried many ways but I just can't seem to get it.

I have different totals and every employee has different percents they get from the total. So I tried

<cfset mytotal = (#paidamt# * #mypercent#)> and it didn't work because it still saw 65 not .65

I tried

<cfset mytotal = (#paidamt# * ".#mypercent#)> and it gave me a value of 0 or it errored. How do I change a number to a percent? 65 to .65? Thanks.

Jeff

<cfset mytotal = (#paidamt# / 100)>

ASKER CERTIFIED SOLUTION

membership

This solution is only available to members.

To access this solution, you must be a member of Experts Exchange.

ASKER

Thanks