If Current Time Between

Sometimes an automatization should only run when triggered during a specific timeframe. Like you want to enable DND when you plug in your phone, but only when it’s after 21:30 and before 07:30.

In this example I want to show a way how to achieve this.

Download “If Current Time Between” 69f158f509b94a7bb1dd6c3734438257 – Downloaded 25 times –

Let me explain how it works

First, we need to bring the current date and time into a format we can work with.
We will use “HHmmss” as the “Format String” (see Date Format Patterns for Details).
So hours, minutes and seconds without a separator.

This way we can easily use it in an IF-statement.

Make sure to choose the right type (number) for it, otherwise you can’t choose “in between” as an operator of the IF.

And that’s it.

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *