hi Martin and all
I have set a reminder for ten minutes. four minutes past. how can I get balance minutes of six minutes.
script:
global_10 = addMinutes(getDate(),10); current time is 10.00 a.m after 10.04 a.m I want to get balance minutes of 6.
how can I? and how can I set percentage to global_10?
thanks from record4
balance time
Moderator: Martin
balance time
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1
Samsung Galaxy j2 non rooted.
Android 5.1.1
Re: balance time
Just deduct the global_10 from current time.
You will get 360000 (360 seconds, or 6 minutes).
You can then convert it duration as pointed by anuraag in other thread.
Or
If you need percentage, you have to save the starting point time when you add the minutes. If you have a fixed 10 minutes range, just simply divide that 6 minutes to 10 minutes. (360000 / 600000), then times 100% to get it percentage.
Code: Select all
balance = global_10 - getDate();
You can then convert it duration as pointed by anuraag in other thread.
Code: Select all
balance = getDurationString(balance);
Code: Select all
balance = "{balance,dateformat,timezone,UTC,HH:mm:ss}"
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.