Determine time left until next alarm?

Post your questions and help other users.

Moderator: Martin

Post Reply
usersean
Posts: 6
Joined: 13 Feb 2018 20:09

Determine time left until next alarm?

Post by usersean » 17 Feb 2018 16:26

Hello there, I'm trying to make a flow that will check my alarm and tell me how long left until it is going to go off (Example: 5 hours and 2 minutes from now) - but the init alarm variable only seems to return the actual timestamp. I can't find any functions like the ones that exist in Java (toHours(),toMinute etc.) you'd usually use to do this.

Am I missing something or is there no similar functions to do this?

Cheers.

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

Re: Determine time left until next alarm?

Post by anuraag » 18 Feb 2018 04:07

Use a script with following after Init Variable Next Alarm

Code: Select all

duration = getDurationString(next_alarm - triggertime)

usersean
Posts: 6
Joined: 13 Feb 2018 20:09

Re: Determine time left until next alarm?

Post by usersean » 19 Feb 2018 01:21

Oh wow I totally missed that, thank you kindly.

Post Reply