cancel
Showing results for 
Search instead for 
Did you mean: 

Some Infor about the value rounding...

Former Member
0 Kudos

HI,,

Due to some caliclulations...I got

s1=6.083

how can i get the after point 0

if s1=1.555

how can i get the after point 5

Accepted Solutions (1)

Accepted Solutions (1)

edy_simon
Active Contributor
0 Kudos

Hi Seenu,

Are you trying to round the amount / you want to get the last 2 digits only ?

For example,

S1 = 6.083

You need 6.0 or 83 ?

Is your S1 and S2 always 3 decimals ?

Regards

Edy

Former Member
0 Kudos

Hi Sir..

Actually I need is

After point

if values is 6.083

i need  0 (only one digit after dot)

if value is  6.89

i need 8( only one digit after dot)

only one digit  after point....

here some risk is

if value is 60.08

i need after point 0

if value is  6000.18

i need after point 1

how can i get ...............

edy_simon
Active Contributor
0 Kudos

Hi Seenu,

Many ways to achieve this.

One of them is :

        Dim s1 As Double = 6.89

        MsgBox(s1.ToString.Substring(s1.ToString.IndexOf(".") + 1, 1))

Regards

Edy

Former Member
0 Kudos

ok ok i will try

can u solve this one

Some Value caliculations...

Former Member
0 Kudos

Yes...Sir Good

Thank u...

Keep posting... Sir...

Answers (0)