web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / addDays Condition Trigger
Power Automate
Suggested Answer

addDays Condition Trigger

(1) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2
I am still having problems with expressions that include date/time, specifically 'addDays'.

Here is my 'Condition'.

My understanding is - as written, the expression is looking for a Status that equals
'Qualified' and for a Lead Date 90 days or older, yes?
     - addDays(utcNow() -90)



Here are the two new SharePoint items. The top item triggered an email based on
the above, even though the 'Lead Date' is 2/11/2025 (not 90 days old).

What am I missing?
Categories:
I have the same question (0)
  • Suggested answer
    trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at
    Hi,
     
    Looks pretty good.  On the left side, 2nd condition, you will need to wrap (lead date dynamic content) in a formatDateTime(Lead Date),'yyyy-MM-dd') expression.  Save and retest.  Should be good to go!
     

    ------------------------------------------------

     

     

    ⭐ If this was helpful, please like and mark as a verified answer to help others find this too!

     

     

    Always glad to help! 💯💯💯💯💯

     

    Tom

     

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at
    @Phineas It's hard to offer specific recommendations without seeing the logic behind your flow. In edit mode, click on each action to expand it. Upload a screenshot of your full flow.

    However, from what you've shared—I'd recommend you use a Filter Query in your Get Items action to filter out your items FIRST before you loop through them.
     
    Using a Condition action to check each and every item returned from your SP List is inefficient—especially if you have a large number of items.
     
    If you want to return items that are older than your 90 days date—you need to use the is less than or equals to operator.
     
    You might be interested in these YT Tutorials:
    How to Work with 📆 Dates in Power Automate | Example Scenarios and Tips & Tricks
    Are you easily stumped when working with Dates in Power Automate? In this Power Automate tutorial, I’ll show you how to compose an expression that will return a future date, a past date, how to count the number of days between two dates, how to check for a birthdate and anniversary date as well as tips and tricks when working with dates in Power Automate. I’ll cover some common use cases and concepts that can help you to build better Power Automate flows.

    Feel free to skip ahead using the timestamps listed below. I’ve also linked a few other tutorials that you might be interested in as well.

    IN THIS VIDEO:
    ✓ 4 Date Functions You Need to Know
    ✓ How to use the Convert Time Zone Action
    ✓ How to Get a Future Date
    ✓ How to Get a Past Date
    ✓ How to Return SharePoint Items Due in a Number of Days
    ✓ How to Return SharePoint Items Due within a Date Range
    ✓ How to write a Filter Query for SharePoint Items Due in 30, 60 and 90 Days
    ✓ How to Calculate the Number of Days between Two Dates
    ✓ How to Check for a Birthdate and Anniversary Date
    ✓ How to work with Dates and Times in Excel
    ✓ How to use a Manual Trigger with Date Input
    ✓ How to Output Dynamic Text with an Expression
    ✓ How to Check if a Date Falls on a Weekend
     
    -----
     
    Filter Array + Apply to Each: The Best Tip You Need to Know
    In this tutorial—I’m going to show you a quicker way to get the dynamic content from your Filter Array action—and it doesn’t require writing an expression.

    IN THIS VIDEO:
    ✓ How to Loop Through Filter Array Results in Power Automate
    ✓ Using Apply to Each with Filtered Arrays
    ✓ The Easiest Way to Access Dynamic Content from Filter Array
    ✓ Fixing Nested Apply to Each Actions
    ✓ When to Use Value vs. Body Dynamic Content
    ✓ Simplifying Power Automate Flows with Filter Array
    ✓ Troubleshooting Filter Array and Apply to Each Issues
     
     
    Hope this helps!

    Consider giving me a ❤️ if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at
    Thank you for your response.

    Here is my Get Items and a variable I've set, that - I hope, is restricting returns to
    items created in the past 12 hours. 

     Should it be Modified ge ... / or Modified le ... 



    Updated Scope -
  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at
    @trice62

    Not to challenge your large brain (I'm just trying to learn), I received no error (or email during testing as is,
    what is the benefit of changing it to formatDateTime(Lead Date),'yyyy-MM-dd'), seems that's where I usually
    run into my issues. The yy's and mm's and dd's, and their order, frequency and case, seem to complicate things.

    Thanks!
     
     
  • trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at
    Hey there!
     
    I am following up on this post adddays condition trigger in this category building flows from 02/12/2025.  I know the post is a little older, but it is a common question here so wanted to take a moment and follow-up. I see there have been 4 replies and 1 likes and asking if your question has been answered.  If so, please help the community out by completing one or more of the following actions!  Thanks in advance!
     
    Easy as 1-2-3 ‼️💯⭐😎🆒🙏
     
    1) Mark a reply as a verified answer - this is essential, and it helps others with the same general question find this thread. ✅
    2) You can also mark one of more replies as a verified answer.  Please take a moment and give the author credit for volunteering their time. ✌️
    3) Like one or more replies.  Kudos always greatly appreciated! 👍
     
    Pro tip:  if you found your own solution or workaround, feel free to add a reply to your own post and mark it as the solution too!  The goal is to get this thread marked with a verified answer by anyone that finds one or more replies helpful!
     
    Again, thanks in advance for reading and responding, always glad to help!  Tom 💯💯💯💯💯
  • trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at
    If I can help with anything else please let me know or tag me in a future post, I enjoy reading and answering questions.  Always glad to help!  Tom 💯💯💯💯💯

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard