Getting integer value from variable

Hello dudes!
How have you been doing latelly?
I’m trying to get the integer value form some float variables but I can’t. Like, I need the value before the dot. For example, if the value is 2.14, I need to get only the number 2. I have read the built in documentation but I couldn’t find any solution. Could anyone help me? Thanks in advance!

Hi @rafael

Most of the cases the simple python int() should work.

You can either use Evaluate Keyword, or use ${{python eval}}



Thanks fella! You helped a lot with a so that simple solution I hadn’t thought about!

1 Like

Another option is to use Should Be Equal As Numbers, which has argument “precision”, which defines on which accurate (how many decimals) the comparison is done.

1 Like