Formatting a number

  • Thread starter David Carpenter
  • Start date
D

David Carpenter

Is there an easy way to format a number in a Database Results Table? For
example, I'd like 94.6666667 to display 'rounded' as 95.
 
J

Jens Peter Karlsen[FP-MVP]

No easy way. You should be able to do it with ASP when you extract the
number from the Database.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: David Carpenter [mailto:D[email protected]]
Posted At: 06. august 2004 01:15
Posted To: microsoft.public.frontpage.client
Conversation: Formatting a number
Subject: Formatting a number


Is there an easy way to format a number in a Database Results Table?
For example, I'd like 94.6666667 to display 'rounded' as 95.
 
T

Thomas A. Rowe

<%=FormatNumber(recordset("fieldname"),0)%>

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
M

MD Websunlimited

Hi David,

One of two methods:

1. Change the output of the of the results to use VB script
<% =FormatNumber(FP_RS("fieldname"),2) %>

2. Use a custom SQL query string

SELECT FormatNumber([Sales],0) AS Amount
FROM orders;
 
M

Matt's Challenge.com

Mike could you reply with a sample sql for. I have multiple calculations in
the query and would like to format them to only one decimal place.

MD Websunlimited said:
Hi David,

One of two methods:

1. Change the output of the of the results to use VB script
<% =FormatNumber(FP_RS("fieldname"),2) %>

2. Use a custom SQL query string

SELECT FormatNumber([Sales],0) AS Amount
FROM orders;
--
Mike -- FrontPage MVP '97-'02
J-Bots 2004 Released Special Pricing
http://www.websunlimited.com
FrontPage Add-ins Since '97 FP 2003 / 2002 / 2000 Compatible


David Carpenter said:
Is there an easy way to format a number in a Database Results Table? For
example, I'd like 94.6666667 to display 'rounded' as 95.
 
Top