Check if current time lies between two values

0
I've created a microflow which checks if the current hour lies between two values: formatDateTime([%BeginOfCurrentHour%], 'K') >= '8' and formatDateTime([%BeginOfCurrentHour%], 'K') < '11' The first one ( >= '8') comes back as true The second one ( < '11') returns false. However, the current hour at the moment is 10, so it should return true. Any idea what I'm missing?
asked
2 answers
3
parseInteger(formatDateTime([%BeginOfCurrentHour%], 'K') ) >= 8
and
parseInteger(formatDateTime([%BeginOfCurrentHour%], 'K')) < 11

Check: Capital K is hours in pm (0-11), lowercase k is in 0-24.

answered
3

Don't you mean

formatDateTime([%BeginOfCurrentHour%], 'K') >= 8 and formatDateTime([%BeginOfCurrentHour%], 'K') < 11

You're doing string comparisons at the moment o_O

answered