cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
if-man
Regular Visitor

Please spot the error in this flow logic

So, working with this flow I have it set for 3:30 PM EST and 23:30 EST. However, when I make it check for whether or not it is less than 16:00, it goes directly to no when it should have gone to yes. Right now it is 11:23 AM when I post this message. It SHOULD work to use at this time but it defaults to 16 as input for some odd reason. 

 

ifman_0-1645719864015.png

 

ifman_1-1645719926283.png

Need a second pair of eyes on this to see where I'm going wrong.

 

1 ACCEPTED SOLUTION

Accepted Solutions
mattias1172
Responsive Resident
Responsive Resident

Can you try with this method (apologize for the small text):

 

mattias1172_0-1645735121825.png

 

Result:

flow1.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

*Update*

I didn't see your second response until after posting this. The reason the time comes back as 20:XX is because the expression you are using uses UTC, not the time zone you are actually in. Pretty much anything time related in Power Automate does this. The above flow I posted will fix this by converting to a new time zone. In my case, EST but change if you are elsewhere. 

mattias1172_0-1645735583910.png

View solution in original post

9 REPLIES 9
mattias1172
Responsive Resident
Responsive Resident

For the screenshots attached, what did you have as your time input? According to the second screenshot, the output being passed into the logic is 16 and in that case, 16 < 16 being false is correct (16 = 16, not less than 16).

 

For this to come out as True, you'd need 16 is less than or equal to 16. 

 

mattias1172_0-1645724863892.png

 

mattias1172_1-1645724895532.png

 

My time output was set to utcnow as it formats it to basically 11. But the number comes out to 16, even if it was around 11:23 AM EST it still defaulted to a 16. Still have no understanding as to why it was setting that way when I wanted to let it grab from the time it has at that time.

 

Also I can set it to less than or equal to but when it hits around 3:30 PM/ 15:30 I'm sure it will work. I'm worried that if it isn't past that time which it should trigger around 23:30

if-man
Regular Visitor

Update: It did not work. For some reason the input was 20 at 3:30 PM EST/ 15:30 and do not understand how the input/output works for this certain design. It makes no sense on how it would work like that.

 

ifman_0-1645734923958.png

 

mattias1172
Responsive Resident
Responsive Resident

Can you try with this method (apologize for the small text):

 

mattias1172_0-1645735121825.png

 

Result:

flow1.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

*Update*

I didn't see your second response until after posting this. The reason the time comes back as 20:XX is because the expression you are using uses UTC, not the time zone you are actually in. Pretty much anything time related in Power Automate does this. The above flow I posted will fix this by converting to a new time zone. In my case, EST but change if you are elsewhere. 

mattias1172_0-1645735583910.png

How did you set up the Int? is it Int(Converted Timezone) or something else?

mattias1172
Responsive Resident
Responsive Resident

the syntax is: int(string)

 

Here is the exact expression: int(body('Convert_Timezone'))

 

I passed the dynamic content of the "Convert Timezone" action:

mattias1172_0-1645736247012.png

 

Thank you so much for the help @mattias1172! But just a closing question is Power Automate always on the UTC even if I put down the EST UTC? Or am I just getting the timezones wrong?

Thank you so much for the help @mattias1172! But just a closing question is Power Automate always on the UTC even if I put down the EST UTC? Or am I just getting the timezones wrong?

mattias1172
Responsive Resident
Responsive Resident

Unless there is an option to select the time zone, it defaults to UTC. If there is no option within the action itself, you would just need to use the time zone convert action. 

 

As an example, the "Create Event" Outlook action has an option to select the time zone:

mattias1172_0-1645803330452.png

 

If you ever look at Azure/Exchange logs, you'll see a lot of UTC as well. 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,892)