Cannot use getLong API - result datatype not Time or Date.
A Java expression created with the advanced interface uses the getLong API to get the result of an expression that does not return a Date or Time value. You can only use getLong to get the result of an expression with a Date or Time return value.
Use the getInt or getDouble API with the expression.