Doonline
(Doonlinejob23)
May 10, 2022, 8:24am
1
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
Yoichi
(Yoichi)
May 10, 2022, 8:28am
3
Hi,
Can you try the following expression?
Math.Round(doubleVar,0,MidpointRounding.AwayFromZero)
Or
CInt(Math.Round(doubleVar,0,MidpointRounding.AwayFromZero))
Regaards,
Nithin_P
(Nithin Prabhu)
May 10, 2022, 8:29am
5
Hi @Doonline ,
Try this !
Math.Round(345.567d).ToString
ppr
(Peter Preuss)
May 10, 2022, 8:31am
7
you can prototype it by yourself:
For more control @Yoichi gave you additional options
Yoichi
(Yoichi)
May 10, 2022, 8:34am
8
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.
system
(system)
Closed
May 13, 2022, 8:50am
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.