Convert Float to Integer

Is there a native way in Mx to convert a Float value to an integer? I use minutesBetween([%BeginOfCurrentDay%],$Server_DateTime) to obtain the number of minutes into the current day (which is returned as a Float), and I need to compare this value with start/end times stored elsewhere as integers. The current workaround I have is to use Java to convert the Float to an integer, which would return as Long :(, then convert to string... int tmpInt = inputFloat.intValue(); String tmpStr = Integer.toString(tmpInt); return tmpStr; Then I use parseInteger to convert the returned string to an integer. There must be a better way! Does anyone know of a better way to do this conversion?
2 answers

You can use the round, floor, or ceiling functions in microflow expressions. See the documentation for a full overview of the available functions and their use.


Rounding a float using the round, floor or ceil functions will give you an integer (or long) value I think.