Link to home
Start Free TrialLog in
Avatar of Whing Dela Cruz
Whing Dela CruzFlag for Anguilla

asked on

Two decimal

Hi experts, I wish to convert 1 to write into 1.00 Please see the code below

<%
i = 48 //I wish to write this into 48.00
j = 48.5 //I wish to write this into 48.50
%>
ASKER CERTIFIED SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
try

<%=FormatNumber(n,2)%>

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Whing Dela Cruz

ASKER

Thanks both of you guys, its working!
Where does the JavaScript come in - are you wanting to output this from ASP or in JavaScript?

If ASP take a look at FormatNumber

If JavaScript take a look at toFixed()