Convert older Date to current Date with old time

system.date.setTime(
    system.date.now(),
    system.date.getHour24(last_sample_time),
    system.date.getMinute(last_sample_time),
    system.date.getSecond(last_sample_time)
)

https://docs.inductiveautomation.com/display/DOC81/system.date.setTime

https://docs.inductiveautomation.com/pages/viewpage.action?pageId=58603995

1 Like