Hi,
I just want to get the integer part of a decimal number. Here is what I want to do with my test rule.
import java.lang.Math
import java.lang.Integer
var Number Display_Hour_Time
var Number Test
rule “Test”
when
Item Switch_test received command
then
Test = 19.82
Display_Hour_Time = (Integer::parseInt(Test))
sendXMPP(“xxxxxx@xxxxxxxx”,"Test: "+ Display_Hour_Time)
end
I get an exception like: Could not invoke method: java.lang.Integer.parseInt(java.lang.String,int) on instance: null
I search on the web and don’t find anything. Someone know what to do ?
Thank you,
Gilles.