ASP percentage value by using FormatPercent function
We can get the percentage of two numbers by using ASP function FormatPercent(). We can use this function to get the percentage and we can format the output as per our requirement. Here is the syntax of FormatPercent function.
Here n1 and n2 are two variables and d3 is the number specifying number of decimal places required. d3 is an optional value we can specify as the number of decimal places we want. Default value for this is 2.
Here is an example of FormatPercent function.
one more example without using optional value for decimal places
my_num=FormatPercent(11/203,6) ' Output is 5.418719%
my_num=FormatPercent(11/203) ' Output is 5.42%
Be the first to post comment on this article :