Hmm - i get the same error, even if I slightly modify the example like this:
rule "test time parsing"
when
Item Scene_Test changed
then
val SimpleDateFormat dateFormatter = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss")
val String dateTimeValue = dateFormatter.format(new Date("12.04.2019 14:09:07"))
val DateTime parsedDateTime = new DateTime(dateFormatter.parse(dateTimeValue))
logInfo("Test", "Test finished: " + parsedDateTime)
end
My first idea were missing imports but the following also doesn’t seem to help:
import java.text.DateFormat
import java.text.SimpleDateFormat
import java.util.Date
Also an additional Google search didn’t help…
Maybe we can invoke @rlkoshak, he is almost always very helpful with rule related problems (and many other problems
) 