I’ve used this example below and it works when you .postUpdate a NEW date variable in the rule but the issue I’m having is I want to use a pre-existing Item that already has the date in there which it doesn’t work.
DateTime OH_Uptime "Up Time [%1$tm.%1$td.%1$tY %1$tH:%1$tM]" <time>
import java.time.ZonedDateTime Rule1: OH_Uptime.postUpdate(new DateTimeType())
OH_Uptime variable is 2021-11-18T13:22:50.251059-0600
Rule 2: (neither one works) val Number item_millis = OH_Uptime.zonedDateTime.toInstant.toEpochMilli val Number item_millis = OH_Uptime.state.zonedDateTime.toInstant.toEpochMilli
Any suggestions would be helpful.