Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how do i allow my percentage to have a decimal place?

Former Member
0 Kudos

Hi all,

currently i need to do a total count value for my record for jus a particular field. and make it to a percentage for user to see. but how do i cater it in a way where my percentage other than showing a whole number out it can also show it decimal place? An etc of my scenario is listed below:

Male -> 102 count = 64.56%

Female -> 50 count = 33.44%

May i know what is the code for that? thx.

1 ACCEPTED SOLUTION

former_member156446
Active Contributor
0 Kudos

declare ur variable male and female type P decimal 2.

data: male type p decimal 2,

female type p decimal 2.

2 REPLIES 2

former_member156446
Active Contributor
0 Kudos

declare ur variable male and female type P decimal 2.

data: male type p decimal 2,

female type p decimal 2.

Former Member
0 Kudos

Hi jackandjay,

thx for your helpful solution. i managed to solved it with ur help.