How to Round up the integer value

Hii Please Help ASAP!!

My requirement is if the value is 330.08735 then the roundup value should be 330.Bcoz after decimal the first digit is less than five.
If the value is 331.540 the the roundup value should be 332 bcoz first digit after decimal is 5

grafik

Hi,

Can you try the following expression?

Math.Round(doubleVar,0,MidpointRounding.AwayFromZero)

Or

CInt(Math.Round(doubleVar,0,MidpointRounding.AwayFromZero))

Regaards,

it will not round up

Hi @Doonline,

Try this !

Math.Round(345.567d).ToString

what if value is 331.82

you can prototype it by yourself:
grafik

For more control @Yoichi gave you additional options

Hi,

Can you try 330.5?

Cint(330.5) returns 330

Math.Round(330.5,0,MidpointRounding.AwayFromZero) returns 331

Math.Round(330.5) returns 330.

Regards,

Hello @Doonline ,

You can use Format Value activity in the UiPATH.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.