DateTime Calulation

If you’re working in a rule, something like this might work:

var t1 = (SOULISS_TIMESTAMP.state as DateTimeType).calendar.timeInMillis
var DateTime t2 = new DateTime()
var DateTime diff = t2.minus(t1)
// process the diff value here...

I’ve not tested this; it’s based on another conversation about datetime processing…