Round Down Decimal Field to Integer

0
I have a decimal field in an entity being imported from another system, but I want to store this in a local entity as an integer. The tricky part is that the figure should always be rounded down. I had a look at the normal rounding options, and neither of them do what I want, which is that any decimal should always round DOWN to the nearest integer. So 1.5 should be 1, 2.5 should be 2, 2.99999 should be 2 etc Is there a good way to handle this, or do I need to convert it to a string and split on a decimal or something like that?
asked
3 answers
2

use

floor($yourdecimalvalue)

https://docs.mendix.com/refguide/mathematical-function-calls

answered
2

He Russel,

Did you try the floor() function? Here is a complete list of mathematical functions: https://docs.mendix.com/refguide/mathematical-function-calls

answered
0

Alas I can only mark one correct answer, but the floor function is it, thank you guys!

answered