Hi Guys,
Is there any way to check the number has decimal places. I tried this ```
num % 1 != 0
but didn’t work with the if function.
Kindly requesting your help on this
Thanks and regards
charith
Hi Guys,
Is there any way to check the number has decimal places. I tried this ```
num % 1 != 0
but didn’t work with the if function.
Kindly requesting your help on this
Thanks and regards
charith
If YourNumber.toString.Contains(“.”)
Then its decimal number
else
Whole Number
Thanks @lakshman i’ll check and let you know.
This is wrong, because there are countries using comma as a decimal separator. Use the below as test, with var2 being Double. (true=> integer, false=>decimal)
Math.Truncate(var2)=var2
Hey @c.ciprian,
Thanks a lot . it works
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.