How to convert global variable time to seconds

Post your questions and help other users.

Moderator: Martin

Post Reply
icefox56
Posts: 53
Joined: 15 Aug 2017 02:56

How to convert global variable time to seconds

Post by icefox56 » 29 Mar 2020 15:04

Global variables stores time as 1585491900000 2020-03-29 20:33:00:000

How can I convert this into seconds in automagic and use that value in 'Action: sleep'?
Asus Zenfone Max pro M1, Stock android, Oreo 8.1, Rooted

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: How to convert global variable time to seconds

Post by anuraag » 29 Mar 2020 15:26

getDurationString(global_variable - triggertime)

icefox56
Posts: 53
Joined: 15 Aug 2017 02:56

Re: How to convert global variable time to seconds

Post by icefox56 » 29 Mar 2020 15:39

It works, thanks.
Asus Zenfone Max pro M1, Stock android, Oreo 8.1, Rooted

Post Reply