WANTS TO MAKE SOFTWARE WITHOUT KNOWLEDGE OF ASP? CLICK HERE
The FormatPercent function returns
an expression formatted as a percentage (multiplied by 100) with a trailing %
character. Returns an expression formatted as a percentage (multiplied by 100)
with a trailing % character. The Syntax of formatpercent function
is :-
FormatPercent(Expression[,NumDigAfterDec[,
IncLeadingDig[,UseParForNegNum[,GroupDig]]]]) | Example#1
:-
Code :- 'How many
percent is 6 of 345? document.write(FormatPercent(6/345)) Output :-
1.74% | Example#2 :-
Code :- 'How
many percent is 6 of 345? document.write(FormatPercent(6/345,1)) Output
:- 1.7% | There are Four Mandatory
Argument :-
- Num Digits After Decimal :- The optional Num
Digits After Decimal argument allows you to choose the number of digits after
the decimal.
Example#1 :-
Code :- <%
=FormatPercent(.123456789, 4) Output :- 12.3457%
| - Include Leading Digit :- The optional
Include Leading Digit argument includes the leading zero.
You must only
use the constant or value from the Tristate CONSTANTS for this argument.
CONSTANT | VALUE | DESCRIPTION |
TristateTrue | -1 | True,
will use options | TristateFalse
| 0 | False, will not use options |
TristateUseDefault | -2 | Use
default setting | Example#1 :-
Code :- <%
=FormatPercent(.0098, 4, -1) %> Output :- 0.9800%
| - Use Parens For Negative Numbers
:-The optional Use Parens For Negative Number argument replaces a negative
sign with parentheses around the number.
You must only use the constant
or value from the Tristate CONSTANTS for this argument.
CONSTANT | VALUE | DESCRIPTION |
TristateTrue | -1 | True,
will use options | TristateFalse | 0 | False,
will not use options | TristateUseDefault | -2 | Use
default setting | Example#1 :-
Code :- <%
=FormatPercent(-.77, 2, 0, -1) %> Output :- (77.00%)
|
©Copyright 2024. Virtual Splat Software Pvt. Ltd. All Rights Reserved.
Terms and Conditions / Privacy Policy / Refund Policy / Shipping Policy
|