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 Automate
Answered

Filter Tasks

(0) ShareShare
ReportReport
Posted on by 106

Background: I want a flow to filter my tasks that are due exactly 30 days from today. 

 

Problem: I have created "test" tasks that are exactly 30 days from today. No tasks return on every test I run.

 

Flow:

martzj_0-1719603159732.png

 

Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,504 Super User 2025 Season 2 on at

    @martzj Can you share your expression?

     

    In the meantime, you might find this YT Tutorial helpful: 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

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    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
  • martzj Profile Picture
    106 on at

    @creativeopinion 

     

    formatDateTime(addDays(utcNow(), 30), 'yyyy-MM-dd')

  • Nived_Nambiar Profile Picture
    18,136 Super User 2025 Season 2 on at

    Hi @martzj 

     

    Here the value due date time dynamic content is having time component along with date. and in the right side- you are comparing date component only using the formatDateTime expression, You need to apply same formatDateTime function on left side to convert the due date to yyyy-MM-dd format. 

     

    Like below for the highlighted area:

    Nived_Nambiar_0-1719672304160.png

     

    formatDateTime(item()?['dueDateTime'],'yyyy-MM-dd')

     

    Hope this helps !

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • martzj Profile Picture
    106 on at

    @Nived_Nambiar 

     

    I get this error when using that expression,

     

    martzj_0-1719672974091.png

     

    Another way, if the Time is always 10:00:00Z can it also be solved another way?

  • Nived_Nambiar Profile Picture
    18,136 Super User 2025 Season 2 on at

    Hi @martzj 

     

    is any of task- due date is not provided ?

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • Verified answer
    Nived_Nambiar Profile Picture
    18,136 Super User 2025 Season 2 on at

    Hi @martzj 

     

    Try this expression- i understood that no due date can create this issue - to avoid that, try this expression in filter array

    Nived_Nambiar_0-1719673983560.png

     

    Expression in left side- 

    and(not(equals(item()?['dueDateTime'],null)),equals(formatDateTime(item()?['dueDateTime'], 'yyyy-MM-dd'),formatDateTime(addDays(utcNow(), 30), 'yyyy-MM-dd')))
     
    Hope it helps !
    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌


  • martzj Profile Picture
    106 on at

    @Nived_Nambiar 

     

    All my tasks in that plan Id have assigned due dates whether already completed or not. I am at a lost. If there was a task without a due date and it was deleted, would that be effecting this?

     

    My main goal is to create a flow that returns all tasks due within 30 days and email the person assigned to that task that's due in 30 days. Maybe there is another way to build this?

  • martzj Profile Picture
    106 on at

    @Nived_Nambiar 

     

    That worked!!!!!

  • Nived_Nambiar Profile Picture
    18,136 Super User 2025 Season 2 on at

    Hi @martzj 

     

    Kindly mark the answer as solution so that it helps others in future !

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 331 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 203 Most Valuable Professional

Last 30 days Overall leaderboard