Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 15th, 2005, 06:35 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default add a '.00'

I am response.writing from a loop.

<%
response.write "<td align=right>&nbsp;" & childmatch.SubMatches(0) & "</td>"
%>

These values are, for example, going into a HTML table like this:

Adult Net Net 184
Pre-Addon 0
Markup 0
Agent Markup 0
Weekend Supplement 0
Fuel Surcharge 0
Gross Fare 184
Tax 70.40
Booking Fee 0
TOTAL 254.40

How can I add a '.00' to the end of values that have no decimal point? (exc. the Tax and the Total)

Thanks.

Picco

www.crmpicco.co.uk
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old February 15th, 2005, 06:53 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

You can use the function formatnumber

usage : formatnumber(<number>, <number of decimal digits>)

example : formatnumber(7,2) will print 7.00





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Extended price over $1,000.00 JDBennett BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 8th, 2008 12:04 PM
Moving 2,00,000 records effectively FileFound Visual Studio 2005 9 September 21st, 2007 08:20 AM
file cannot load with apache2.00.55 GOUR CHANDRA PAUL PHP How-To 1 February 12th, 2006 06:22 PM
Format rounding figure : 1235.00 => 1200.00 Jane SQL Language 1 June 27th, 2003 02:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.