Skip to main content
Community site session details

Community site session details

Session Id : i9ypq6LT1AwqrRZ6btoxDm
Power Automate - Building Flows
Unanswered

"Less than" time of day condition is not evaluating correctly.

Like (0) ShareShare
ReportReport
Posted on 23 Sep 2019 16:41:02 by 2

I have a fairly simple flow setup to run against a shared mailbox that looks to see if a message was received outside of office hours, and if it does, then it gives the sender an option to alert the after hours team, or wait until business hours for a response.  I have it setup to activate if the email was received before 8am, after 5pm, on Saturday or Sunday.  For some reason, it will activate until 9am, and I can't see why.

 

Here is how I have it setup to grab the local time (EST) and a condition to to check if that time is before 8am:1.png2.png3.png4.png

This only seem to evaluate as true until 9am.  I have also tried having the condition test against "Less than 08:00:00", but had the same result as using "Less than or equal to 07:59:59".  For reference, the bottom 2 conditions are checking the day of week and the flow shows this same message had an output of "1".

  • MattWeston365 Profile Picture
    1,701 on 23 Sep 2019 at 17:05:36
    Re: "Less than" time of day condition is not evaluating correctly.

    Just to add my thoughts into the mix as well, it may be because you're just trying to compare against the time which I've had mixed success with. I tend to compare against the entire date time string to be sure.

     

    The difference for me is that I've used the Convert Time Zone action which gives me more visibility of what is going on, but then when it comes to the condition, I build the date section of my comparison each time using this expression:

    formatDateTime(utcNow(),'yyyy-MM-ddT17:00:00)

     

    I would then just change the static part of the time to the times that I want e.g. 08:00:00 for 8AM or 17:00:00 for 5PM

     

    Flow-Dates.PNG

  • BrianMills Profile Picture
    2 on 23 Sep 2019 at 17:05:19
    Re: "Less than" time of day condition is not evaluating correctly.

    I don't think so, because it works on the 5PM side of things, plus the time that it is checking against is evaluating correctly.

  • ScottShearer Profile Picture
    25,236 Most Valuable Professional on 23 Sep 2019 at 16:57:52
    Re: "Less than" time of day condition is not evaluating correctly.

    @BrianMills 

    If I understand you correctly, your calculations are one hour off.  Could this be an issue with Eastern Standard Time vs Daylight Savings Time?

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2