473,394 Members | 1,742 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,394 software developers and data experts.

Round Integer

Is there a way to format an integer (when displayed as a string) always
rounded downwards. So that 9.99 would be displayed as a 9 and a 10.01 would
be showed as 10 ?

Niclas
Jan 9 '06 #1
2 1504

I thought that decimal.Floor( decmial ) does that. I haven't tried and
tests.

Micah

"Niclas" <li*************@hotmail.com> wrote in message
news:OY*************@TK2MSFTNGP10.phx.gbl...
Is there a way to format an integer (when displayed as a string) always
rounded downwards. So that 9.99 would be displayed as a 9 and a 10.01
would be showed as 10 ?

Niclas

Jan 9 '06 #2
I does work ! thanks for the help.

Nic
"Micah N" <no***@nowhere.com> wrote in message
news:OY**************@tk2msftngp13.phx.gbl...

I thought that decimal.Floor( decmial ) does that. I haven't tried and
tests.

Micah

"Niclas" <li*************@hotmail.com> wrote in message
news:OY*************@TK2MSFTNGP10.phx.gbl...
Is there a way to format an integer (when displayed as a string) always
rounded downwards. So that 9.99 would be displayed as a 9 and a 10.01
would be showed as 10 ?

Niclas


Jan 9 '06 #3

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

Similar topics

11
by: Russell E. Owen | last post by:
I realize this probably a stupid question, but...is it safe to round to the nearest integer by using int(round(val))? I suspect it is fine, but wanted to be sure that weird floating point...
6
by: Jef Driesen | last post by:
I need to implement a function to implement the rounding of floating point values. At the moment i have two different implementations, depending on the type of the return value (integer or double)....
3
by: mg | last post by:
Hi everybody... We try to white scripts with Pyrhon 2.4 for an acoustic simulation and we wrote these follow lines : <begin script> c = 340 i =j=k= 1 sum_ = 23 table =
14
by: Nils Grimsmo | last post by:
Why did round() change in Python 2.4? $ python2.3 Python 2.3.5 (#2, Jun 19 2005, 13:28:00) on linux2 >>> round(0.0225, 3) 0.023 >>> "%.3f" % round(0.0225, 3) '0.023' >>>
6
by: Penguin | last post by:
At some long ago time Steve Jorgensen answered thus: Subject: Re: How can I round a time? Newsgroups: comp.databases.ms-access Date: 1998/12/11 Access represents a date internally as a double...
10
by: tmeister | last post by:
I'm trying to determine the best approach for rounding in an application I'm building. Unfortunately it appears as though SQL Server and VB.NET round in different ways. SQL Server select...
9
by: Ronald W. Roberts | last post by:
I'm having a problem understanding the Round function. Below are quotes from two books on VB.NET. The first book shows examples with one argument and how it rounds. The second book something...
21
by: Karl O. Pinc | last post by:
FYI, It'd be nice if the error message from a REFERENCES constraint mentioned the column name into which the bad data was attempted to be inserted. In PostgreSQL 7.3: sandbox=> insert into...
0
by: thaisummitneel | last post by:
sir I have created a database in ms-access.Connected database using ADODB I have written a query to round integer to nearest value such as con.execute"update tablename set...
2
by: =?Utf-8?B?aGVyYmVydA==?= | last post by:
how do I code generic functions to return the next item in an enumeration a) sorted by name, b) sorted by value c) sorted by declaration in a round-robin style ? for example the enum is Enum...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.