Skip to main content

Notifications

Power Automate - General Discussion
Answered

Check Dates Greater than

(1) ShareShare
ReportReport
Posted on by 206

Hello Community,

I need assistance with a Power Automate flow for an Excel file stored on my SharePoint page. Here's what I need to achieve:

  1. Check Dates: The flow should verify if at least one row in the Excel file has a date greater than 7 days from today.
  2. Alert: If no such row exists, I should receive a single email alert.
  3. Date Format: The dates in the Excel file are formatted as "mm\/dd\/yyyy" (Custom).

I’m currently stuck because  theoretically "Apply to each" would trigger multiple emails, and I'm unsure how to handle the date format.

Any guidance would be greatly appreciated.

Categories:
  • batvan276 Profile Picture
    batvan276 206 on at
    Check Dates Greater than
    Thanks for the resources. I successfully managed to solve my issues using a filter array and setting the iso time format.
  • Verified answer
    creativeopinion Profile Picture
    creativeopinion 10,149 on at
    Check Dates Greater than
    When dealing with Dates and Times in Excel you need to ensure that you select ISO 8601 as the DateTime format in the List Rows Present in a Table action.

    It's always best practice to filter out the rows you want to loop through first. You can define a Filter query in the Filter Query field of the List Rows Present in a table action. This action will only accept a single filter query. You also need to ensure that the text in your column header you are using in the filter query field doesn't contain any spaces.
     
    If you need to filter out your data by more than one condition, you'll need to use a Filter Array action. I've linked a few tutorials that you might be interested in below.
     
    Although this tutorial covers how to send a single email with multiple SP items, the concepts covered in this tutorial can be applied to your flow: How to Send a SINGLE EMAIL ✉️ with multiple SharePoint list items | Build THIS Power Automate Flow

    Building a Power Automate flow that will send an email with multiple SharePoint items can be a bit complex. In this video tutorial I’ll cover how to build a flow that will send a single email to each user with tasks that have been assigned to them. The logic in this flow can be applied to many different scenarios.

    First, I’ll show you how to use a Filter Query to return items from your SharePoint list that meet your criteria. Then I’ll show you how to return a list of unique email addresses so that each user receives a single email. Lastly I’ll show you how to compose an email that will contain an HTML table with a list of tasks for each user.

    IN THIS VIDEO:
    ✅ How to send multiple list items in a single email with a Power Automate Flow
    ✅ How to create a dynamic date range
    ✅ How to use the Convert Time Zone action
    ✅ How to use a Filter Query in the Get Items action
    ✅ How to count number of items in an array
    ✅ How to use the Select action to extract a users display name and email address
    ✅ How to create a unique list of email addresses
    ✅ How to use the Create HTML Table action
    ✅ How to customize the HTML Table with CSS styles
    ✅ How to use the Send an email (V2) action
    ✅ How to use the Append to String Variable action
    ✅ How to create a custom list of items for an email
    ✅ How to use the Send an email (V2) action
    ✅ How to display singular or plural text based on the number of items returned

    ----
    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
    ----
    To learn more about how to use the Filter Array action, please refer to this YT Tutorial: Are you using the Microsoft Power Automate Filter Array Action wrong?
     
    In this video tutorial I’ll show you 3 practical ways to use the Filter Array action and how to use it properly.

    1️⃣ Cross-Referencing Data
    2️⃣ Filtering by Key
    3️⃣ Substring Matching
     
    Did you know that the Condition action has a limit of 10 conditions? Although it might look like the Filter Array action can only accept one condition—this is not true. By using the advanced mode you can enter multiple conditions into a Filter Array action with an expression.
     
    IN THIS VIDEO:
    ✅ 3 Ways to Use the Filter Array Action
    ✅ How to use the Scope Action to Group Actions
    ✅ How to Check the Number of Items returned from a Filter Array Action
    ✅ How to Cross-Reference Data in Excel with a SharePoint List
    ✅ How the Filter Array Action Works
    ✅ How to Access the Dynamic Content from a Filter Array Action
    ✅ How to Filter Items by a Key
    ✅ How to Filter Items by Matching a Substring
    ✅ How to Use Multiple Conditions in a Filter Array Action
     
     
    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
     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,691

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 65,019

Leaderboard