473,503 Members | 1,300 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fomat decimal numbers in ASP

2 New Member
I use Dreamweaver to generate asp pages. I have an access database with numbers. In access the numbers are displaying and formatted to Double, fomat 2 decimals. On teh website the numbers don't display 0's after the decimal point, ie 2.00 shows as 2 , or 2.10 displays as 2.1 etc How could I force the diaplay of 2 decimals, showing the non-significant 0's as well.

I have searched the forum, but cannot find the answer on existing threads

Please help! Thank you
Sarah
Feb 3 '07 #1
2 2767
gateshosting
25 New Member
All you have to do is use the formatnumber() function...

formatnumber(192.394884,2) would give you 192.3... it will also round up.

Best regards,

Michael C. Gates
Feb 4 '07 #2
sarahbarnard
2 New Member
All you have to do is use the formatnumber() function...

formatnumber(192.394884,2) would give you 192.3... it will also round up.

Best regards,

Michael C. Gates
Hi Michael, thank you very much for your reply
Does it mean formatnumber(dynamic database variable field'sname, 2) ??
I have tried maybe making a mistake
Have never used formatnumber before
where should I type format number , I assume in the use statement?
Feb 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

21
4492
by: Batista, Facundo | last post by:
Here I send it. Suggestions and all kinds of recomendations are more than welcomed. If it all goes ok, it'll be a PEP when I finish writing/modifying the code. Thank you. .. Facundo
17
6102
by: John Bentley | last post by:
John Bentley: INTRO The phrase "decimal number" within a programming context is ambiguous. It could refer to the decimal datatype or the related but separate concept of a generic decimal number....
2
3449
by: Steve Summit | last post by:
-----BEGIN PGP SIGNED MESSAGE----- It's often explained that the reason for some of the imprecision in C's definition is so that C can be implemented on different kinds of machines -- say, those...
10
8103
by: Paul Sullivan | last post by:
decimal d; d = 1.1M OR d= (decimal) 1.1 Discussioon
11
2218
by: Pieter | last post by:
Hi, I'm having some troubles with my numeric-types in my VB.NET 2005 application, together with a SQL Server 2000. - I first used Single in my application, and Decimal in my database. But a...
28
5811
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I convert a Number into a String with exactly 2 decimal places?...
2
9239
by: soni2926 | last post by:
hi, i have the following being returned to be in a string: 20.5 i need to make this with 2 places after the decimal, like 20.50, anyway to do that? I've tried the following but it doesn't seem...
10
5301
by: Jason | last post by:
I'm making a program that will convert decimal inputs (in this case, in inches) and output a fractional answer. At the moment, I'm only able to output the fractional answer in three parts: A whole...
0
28042
Frinavale
by: Frinavale | last post by:
Convert a Hex number into a decimal number and a decimal number to Hex number This is a very simple script that converts decimal numbers into hex values and hex values into decimal numbers. The...
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7089
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7282
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6995
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1515
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
738
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
389
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.