Divide a variable and always round off

Hi,

i need your help again :slight_smile:
Once again I can’t find the right command for it.

as an an example . I have two INT32:
quanty = 3108
divident = 10

Divide these two and always round the result down to a whole number:
3108 / 10 = 310,8 → 310

what is the correct entry for it ?

Thanks in advance !

grafik
So floor or \ will match your case

2 Likes

Hi @juergenh1975

Math.Round(Cint(310.8)) or Math.Floor(Cint(310.8)) 

Regards
Sudharsan

1 Like

Hi,

Can you try backslash operator as the following?

3108 \ 10

Regards,

1 Like

that’s how easy it is ??? Too often I think too complicated :frowning:
Thanks to all !

1 Like

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