We help IT Professionals succeed at work.

Two decimal

Whing Dela Cruz
on
150 Views
Last Modified: 2017-04-11
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
%>
Comment
Watch Question

Web Ninja at large
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
HainKurtSr. System Analyst
CERTIFIED EXPERT

Commented:
try

<%=FormatNumber(n,2)%>

Open in new window

HainKurtSr. System Analyst
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Thanks both of you guys, its working!
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2019

Commented:
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()