Need to format float with no decimals or decimal point.

Is there a format for float that displays only the integer portion?  Or at the least, integer portion and decimal point but no digits to right?

Eval("L_DistCalc", "{0:f}")

Thank you,

0
zoltac007
8/2/2007 7:21:10 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

3 Replies
802 Views

Similar Articles

[PageSpeed] 0


What about this:

Eval("L_DistCalc", "{0:f0}")


Limno

0
limno
8/2/2007 8:10:02 PM

Wow - thanks.  Is there a good reference book that has all the format forms, control structures and properties.  Everything I have has a the essentials but nothing in depth.  I know this kind of thing is simple but is sure is a lot to try and remember.

Thank you, 

0
zoltac007
8/2/2007 8:41:07 PM
0
limno
8/2/2007 9:00:31 PM
Reply:

Similar Artilces:

How to validate a decimal value with 2 digits after decimal point (de decimal point is a comma)
  I am a newbee, I have a Textbox where de user must write the price of an object. How can I validate de data entry in the Textbox (it must be a valid decimal with 2 digits after decimal point), and my pages are in  Portuguese so the decimal point to be accepted must be a comma   thanks  well you can do something like followig:  suppose TextBox1.Text = 123456,789 then you can say if(TextBox1.Text.Contains(",") ) {     int index1 = TextBox1.Text.IndexOf(",") +1;     int index2 = TextBox1.Text.IndexOf(...

Formatting a decimal to 2 decimal places
Hi - just testing some code, and the code below returns a number with 3 decimal places (eg. 450.000). Will returning a decimal always give 3 decimal places, and if so, how can I remove the last one? I don't want to use: Return String.Format("{0:C}", decRunningTotal) - as that will automatically add a $ or £ or whatever to the start, and I'd like to control that. I'd really appreciate any help, thanks, Mark Function GetItemTotal() As String objDT = Session("Cart") Dim intCounter As Integer Dim decRunningTotal As Deci...

how to convert value with decimal point into value with decimal comma
Hello,  I like to know how I can change (for example) the value 55.55 into 55,55. (The system in my country is using comma's instead of points) I'm starting with  a string with the value "55.55" Then I will convert it to a double 55,55 Do I need the the system.Globalization namespace or is there just a simple solution?               Hi,If you are just going to use this format for display then it would be easy to do this:double dTemp;dTemp = 55.55;Response.Write(dTemp.ToString().Replace(".",","));H...

Edit format; decimal points
In our PB application we do have a lot of datawindows with quantity fields. Most of the times (99%) the users have to enter whole numbers only but sometimes they want to enter decimal values. In the database I have a decimal field 8.2. but I am struggeling to get a right Edit mask. I like to have the following: Value of the field Display 2.00 2 2.10 2.10 (or 2.1) 2.25 2.25 Empty Nothing The problem is that when I use the format ##,###.## the decimal...

Supress Decimal Point in format
PowerBuilder 8.0.4 Build 10501 How can i get the following 12.43 1 1.5 13 i.e only show decimal places and the dp, if the item is not an integer. if i use the format #,##0.## i get : 12.43 1. 1.5 13. Which is close, but still shows the "." for integers. I did manages to get it working using a formula within a dw format field if(abs(x) <> x,"#,##0.00","#,##0") - but this really slowed down the report + i would also like to use the format in the script string function : string(12.5,'#,##0.##...

CLR.NET datatype for decimal is System.String or Decimal
CLR.NET datatype for decimal is System.String or System.Decimal the documentation says System.string while it is mapped to DbType.decimal I need some understanding on this. any help thanks vsv ...

How to format a string of percentage format to decimal format ?
How to format a string of percentage format to decimal format ? 1    orginalValue  // value will be 1265.48 2    percentString // value after applying percentage format will be 126548 %3    requiredvalue // value should be 1265.48  I converted the string from orginalValue to percentString, now i need to convert back to requiredvalue. Is there any way to do ? regards, Ananth RM - msarm.com  string percentString="126548 %";double value=double.Parse(percentString.Replace("%","").Tri...

XSD file Decimal column displays 4 point after decimal
Hi to all,              I have a xsd file with one table adapter, it has 4 column id int name string class string amount decimal i drag and drop the columns into rdlc file but, the report displays 4 digit after decimal point but i want to display it as two decimal point. How to do this experts please help me. But i checked in my query from sql it is displays as it is in the table(there some data have four digit after decimal some data have two digit after decimal) but when get it into DataSet object all data are converted i...

inserting a decimal number from.net to stored proc. with decimal parameter
I'm trying to enter large number 99999999, (8 digits) converting to decimal in .NET, then using that as a parameter in stored proc. which has a decimal type (decimal(15,2) as a parameter. C#:if (txtAnnualizedSaving.Text.Trim() != string.Empty) {try { sdata.AnnualizedSaving = Convert.ToDecimal(txtAnnualizedSaving.Text); // only for testing ....scale = (System.Decimal.GetBits(sdata.AnnualizedSaving)[3] >> 16) & 31; }catch { sdata.AnnualizedSaving = 0; } }   ... In the business object I have the following code:private bool UpdateData() {bool ret = false; try ...

Formatting number with and without decimal point
Can anyone describe how to format a number so that it will show decimal places when there are some but then show the number as an integer (no decimal point) when there are none. Ex. when rounded to 2 decimal places 2.75 should show as 2.75 2.50 should show as 2.5 2.00 should show as 2 Thanks Jay well ... for number display formats, the # represents a number and 0 represents a required number so ... #.## should be what you're looking for Jim On 6 Feb 2008 09:26:12 -0800, in sybase.public.powerbuilder.general <Jay> wrote: >Can anyone describe how...

Formatting number with and without decimal point
This is more of a generic powerbuilder question, but can anyone describe how to format a number so that it will show decimal places when there are some but then show the number as an integer (no decimal point) when there are none. Ex. when rounded to 2 decimal places 2.75 should show as 2.75 2.50 should show as 2.5 2.00 should show as 2 Thanks Jay ...

need help with formatting a decimal number
I have a field that is stored as a float in the database and I have to divide it by 3 when I display it back to the user sometimes I get this: 119.333333333333 How do I format it so it is two decimals or maybe even just drop the decimal all together? Either of these is what Im after: 119.3, 19.33, or 119. Please help. Change for your culture and number of decimal places: // Gets a NumberFormatInfo associated with the en-US culture. NumberFormatInfo nfi = new CultureInfo( "en-US", false ).NumberFormat; // Displays a negative value with th...

SaveAs() to XML. Need . as decimal point instead of ,
Datawindow.SaveAs() to XML file uses , as decimal point instead of the standard(?) . Why? And how can I get all my Decimal fields to use . as it should do? I use PB version 9. /R Hello, did you found a way to solve the problem? The only way I found was a manual replace. ls_xml = dw_text.describe ( 'DataWindow.Data.XML' ) .... and then a manual replace. But it is a dirty way, because it can happen, that you replace a wrong ','. greetings Alex Raymond schrieb: > Datawindow.SaveAs() to XML file uses , as decimal point > instead of the standar...

Need help with Decimal point ssrs field
I have an expression in my ssrs report      =Sum(distance, "mainroute")   when I run the report  I get a total  example   345678.00010298 I need it to reflect 34568 how do I set the decimal to 2 I have tried to use  =Sum(distance, "mainroute"),2 but that does not work  Set the formatstring property of the Sum textbox to d or ####.##Raghu(MCSD.NET, MCAD.NET, MCDBA)[Don't forget to click on Mark as answer on the post that helped you ] Use:N2as the Format property value for that field.- Corwin(My Blog -...

Web resources about - Need to format float with no decimals or decimal point. - asp.net.presentation-controls

Decimal representation - Wikipedia, the free encyclopedia
Proof: Let , where . Then , and the result follows from dividing all sides by . (The fact that has a finite decimal representation is easily ...

Dewey Decimal Classification - Wikipedia, the free encyclopedia
This highly organized system categorizes books on library shelves in an efficient, specific and repeatable order that makes it easy to find any ...

Fraction Calculator + Decimals to Fractions Converter on the App Store on iTunes
Get Fraction Calculator + Decimals to Fractions Converter on the App Store. See screenshots and ratings, and read customer reviews.

Dewey Decimal Tattoo - Flickr - Photo Sharing!
Children's librarians represent.

Math of the Day: Sesame Street’s The Count Reads Pi to 10,000 Decimal Places
... has created a true monster out of your favorite Sesame Street vampire, with audio of The Count reading every digit of Pi out 10,000 decimal ...

UPDATED: Paul Harapin heads Decimal Software as CEO
Former VCE Asia-Pacific boss, Paul Harapin, has confirmed he is the new chief executive officer (CEO) of Decimal Software.

Feeling green: the dangers of decimal currency
The curious case of possibly toxic coins, via Austria and a devastatingly original idea for Canberra.

Jobless Rates With Another Decimal
The BLS reported a jobless rate of 8.3% for both January and February. Adding an extra decimal, the unemployment rates would actually be 8.26% ...

JPMorgan Sued by Trader Over $3 Million Decimal Point
JPMorgan Chase & Co. is being sued by a trader who says he accepted a contract from the investment bank because a typographical error made him ...

.Decimal Archive - Houston Gamer
It was only back in August when newly-formed Houston game studio Orb Interactive launched a Kickstarter campaign for “.Decimal”, a sci-fi take ...

Resources last updated: 12/20/2015 5:19:41 AM