473,320 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Format number

I almost hate to post this here, because it is so basic. But my mind isn't
the same as it used to be.

I am using asp with access db on ms server

total_score is my field from a table within the db., I wish to format this
to show commas, but no decimal. Rounding in other words. What is the code
for this please, can someone show me?

i know it is something like var = format(total_score,0,0) or something to
that effect.
Please don't make me feel like too much like a complete idiot for not
remembering this..lol
Any help would be appreciated
Bam
Dec 10 '05 #1
3 6418
The weird thing is, it is formated correctly within the Access DB, and the
commas show there, but the display on the page doesn't show the commas. See
here:
http://www.gig-golf.com/GIG/ladder/current.asp

"Jeff" <gi*****@adelphia.net> wrote in message
news:ns******************************@adelphia.com ...
I almost hate to post this here, because it is so basic. But my mind isn't
the same as it used to be.

I am using asp with access db on ms server

total_score is my field from a table within the db., I wish to format this
to show commas, but no decimal. Rounding in other words. What is the code
for this please, can someone show me?

i know it is something like var = format(total_score,0,0) or something to
that effect.
Please don't make me feel like too much like a complete idiot for not
remembering this..lol
Any help would be appreciated
Bam

Dec 10 '05 #2
Jeff wrote on 11 dec 2005 in microsoft.public.inetserver.asp.general:
"Jeff" <gi*****@adelphia.net> wrote in message
news:ns******************************@adelphia.com ...
I almost hate to post this here, because it is so basic. But my mind
isn't the same as it used to be.

I am using asp with access db on ms server

total_score is my field from a table within the db., I wish to format
this to show commas, but no decimal. Rounding in other words. What is
the code for this please, can someone show me?

i know it is something like var = format(total_score,0,0) or
something to that effect.
Please don't make me feel like too much like a complete idiot for not
remembering this..lol

[please do not toppost on usenet]
The weird thing is, it is formated correctly within the Access DB, and
the commas show there, but the display on the page doesn't show the
commas. See here:
http://www.gig-golf.com/GIG/ladder/current.asp


You mean, you want to have a thousands seperator with commas?

That depends on your regional settings and do:

<%=formatnumber(myNumber,0)%>

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Dec 10 '05 #3

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn*******************@194.109.133.242...
Jeff wrote on 11 dec 2005 in microsoft.public.inetserver.asp.general:
"Jeff" <gi*****@adelphia.net> wrote in message
news:ns******************************@adelphia.com ...
I almost hate to post this here, because it is so basic. But my mind
isn't the same as it used to be.

I am using asp with access db on ms server

total_score is my field from a table within the db., I wish to format
this to show commas, but no decimal. Rounding in other words. What is
the code for this please, can someone show me?

i know it is something like var = format(total_score,0,0) or
something to that effect.
Please don't make me feel like too much like a complete idiot for not
remembering this..lol


[please do not toppost on usenet]
The weird thing is, it is formated correctly within the Access DB, and
the commas show there, but the display on the page doesn't show the
commas. See here:
http://www.gig-golf.com/GIG/ladder/current.asp


You mean, you want to have a thousands seperator with commas?

That depends on your regional settings and do:

<%=formatnumber(myNumber,0)%>

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Thanks.... all I can say is DOH!!!
Bam
Dec 10 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: martin.mrazek | last post by:
Hello, I wanted to install Number::Format module bud ended up with following error message. Does anybody have any suggestion what the cause could be?? Could that be due to presence of perldl in my...
3
by: stevek | last post by:
How do I format an integer. Add commas. 1234565 1,234,565 TIA
1
by: renee_ld | last post by:
In a query I used the function datediff to calculate the number of minutes between two time periods on a given day. This function returned the number of minutes as a long integer data type. I...
5
by: Macca | last post by:
Hi, I have a table which has a date/time field. I am storing them as follows :- 01/01/2005 11:25 01/01/2005 19:44 02/01/2005 05:04
11
by: Grumble | last post by:
Hello, I have the following structure: struct foo { char *format; /* format string to be used with printf() */ int nparm; /* number of %d specifiers in the format string */ /* 0 <= nparm <=...
11
by: shsandeep | last post by:
I used the following query to retrieve the date in dd-mon-yyyy format. db2 => SELECT RTRIM(CHAR(DAY(COVG_TYP_STRT_DT))) || '-' || RTRIM(MONTHNAME(COVG_TYP_STRT_DT)) || '-' ||...
6
by: JFB | last post by:
Hi all, How can I format a fax number as 888-333-444? The number is coming from database as 8883334444 <ItemTemplate> <%#container.dataItem("cfax")%> </ItemTemplate> Tks JFB
7
by: Michael Howes | last post by:
MSDN documentation for format strings seems ambiguous. It's says things like "significant digits or number of decimal places" all over the place. Well those two things are different. How do I...
10
by: Dixie | last post by:
I am appending some new fields to a table in vba and when I append a number field with is a byte, it does not inherit any format. I want it to be the General Number format, but it is blank. I...
18
by: Dirk Hagemann | last post by:
Hello, From a zone-file of a Microsoft Active Directory integrated DNS server I get the date/time of the dynamic update entries in a format, which is as far as I know the hours since january 1st...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.