Format Numbers

J

John Kirkman

Hello All,

I am pulling some numbers from an Access database and assigning them to
variables. Then I am using the numbers within the page. Everything is fine
except I want to control the formating. For example I want 230 to show as
230.00 and 34.2 to show as 34.20.

Any help would be appreciated.

Thanks,
John
 
J

John Kirkman

Since I have not received a response to my question, I felt I needed to
futher clarifiy my question.

The code that I am using to get the values is:
<%
Set objDC = Server.CreateObject("ADODB.Connection")
objDC.Open Application("database1_ConnectionString")
Set objRS = objDC.Execute("SELECT * FROM tblMember WHERE MemberID=" &
MemberID)
Do Until objRS.EOF
strAmount = objRS("Amount")
objRS.MoveNext
Loop
objRS.Close
Set objRS = Nothing
objDC.Close
Set objDC = Nothing
%>

Then within the page I am using:

<td >Amount is <% =strAmount %></td>

But within the browser it is showing up as:
Amount is 23
When I want it to be:
Amount is 23.00

I really would appreciate any help.

Thanks,
John
 
J

John Kirkman

Mike,

Many thanks!

John
MD WebsUnlimited.com said:
Hi John

formatCurrency(objRS("Amount")

--
Mike -- FrontPage MVP '97-'02
J-Bots Plus 2002 End of Summer Sale You Save $20.00
http://www.websunlimited.com
FrontPage Add-ins Since '97 2003 / 2002 / 2000 Compatible
-------------------------------------------------------------------------- --
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top