Condition: Time range from date to date

Post your questions and help other users.

Moderator: Martin

Post Reply
dibiceli
Posts: 1
Joined: 02 Dec 2017 12:19

Condition: Time range from date to date

Post by dibiceli » 03 Dec 2017 20:42

Hello,

I'm a beginner. I wanted to build a Macro.
For this I need the o.g. Condition. But I did not find the condition unfortunately, or I have overlooked it as a beginner.

During a longer time range (from date to date) the incoming caller of a defined group should be rejected from the telephone book and should receive an SMS with a certain text. (Application: vacation when using the mobile phone for private + business)

Thanks for your help

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Condition: Time range from date to date

Post by Desmanto » 04 Dec 2017 04:16

Condition Time Range only works for a week. Even if you used it, it won't be effective and efficient for the flow. If time range is longer and you don't have vacation/trip so often, it is better to enable/disable flow manually before and after vacation.

Just create the flow as usual, Trigger incoming call from certain group/numbers. Then reject the call, reply it with SMS with predefined text (I'm on leave from .... to .... ). Then before you go to vacation, enable the flow. After you are back, disable the flow.

If you do have trip frequently, you might want to create another flow based upon trigger calendar event; to enable/disable the incoming call flow. Check it to trigger at event start and end, enable when event start, and disable when event end. You have to input the calendar event schedule for vacation start and end date/time.
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.

User avatar
TheBrain1984
Posts: 137
Joined: 07 Aug 2013 08:17
Location: Germany

Re: Condition: Time range from date to date

Post by TheBrain1984 » 04 Dec 2017 12:19

Maybe you can use this:

Requirements:
start_var = the start time you want to the condition to be true (in a date format)
end_var = the end time you want to the condition to be true (in a date format)

Condition: Expression

Expression:

Code: Select all

triggertime > start_var AND triggertime < end_var

Post Reply