|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
How to display only part of a decimal number Hi, If there is a decimal number & i want to display only the complete part ie. left part of the point then how can i do the same? Vb.net platform Let me explain this. In maths 25.49 = 25 and 25.51 = 26 But i don't want this way to get the result I want to display only the number 25 no matter what comes after decimal point. |
#2
| |||
| |||
Re: How to display only part of a decimal number this is the way you can get the desired result! number = cint(int(12.51)) Thanks! |
#3
| |||
| |||
Re: How to display only part of a decimal number First you have to convert from String to a number, then cut the decimal places, then convert to Integer. Conversion from String to number is culture dependent (usually "." or "," as decimal separator). Dim number As Integer number = cint(math.floor(cdec(TextBox1.Text))) msgbox (number) |
![]() |
|
Tags: decimal point, number, vbnet |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting error "Your entry cannot be used. An integer or decimal number may be req" in Excel | Ankit Zh@very | MS Office Support | 2 | 24-01-2012 01:06 PM |
how to increase the number of decimal digits in JAVA program output? | Dennis Racket | Software Development | 2 | 19-01-2012 02:38 PM |
How to convert a decimal number into words in Excel using VBA? | Gandhik | Windows Software | 3 | 27-11-2010 12:59 AM |
How to display decimal numbers in Excel sheet | Halina | Windows Software | 3 | 05-05-2009 03:13 PM |
Help creating 2 part page number | dfeder | Windows Software | 3 | 12-11-2008 12:14 PM |