The docs should be updated and I’m in favor of the approach I showed.
To correct your original error the proper way is
val joda_LastOpen= new DateTime((Door_LastOpen.state as DateTimeType).zonedDateTime.toInstant.toEpochMilli
The docs should be updated to show both really.