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

Community site session details

Session Id : DxWYtAhg3o5XWImUTkJliJ
Power Automate - Building Flows
Unanswered

List Dates Between in a Date Range

Like (0) ShareShare
ReportReport
Posted on 11 Mar 2024 10:06:38 by 2

I have a SharePoint list with this structure:

UserPTO StartPTO End
User103/11/202403/15/2024
User203/15/202403/15/2024
User34/21/20244/25/2024

 

My current flow: 

IMG_3312.jpeg

I have filtered the SharePoint list to only show dates between now and (now + 30 days) to filter out past PTOs.

 

On apply to each, I would like to extract the dates between a user's PTO Start and End dates.

 

After extracting, I need to check if the range between PTO Start and End dates is equal to today. If so, I would like to put in on a table and send it via email.

 

Problem: How do I extract the dates between PTO Start and PTO end?

 

Expected Output: Send an email where it lists the users who are on PTO today.

 

  • ManishSolanki Profile Picture
    15,085 Super User 2025 Season 2 on 11 Mar 2024 at 12:44:32
    Re: List Dates Between in a Date Range

    You could try below filter query to check in between dates:

    PTO_x0020_Start_x0020_Date eq '@{formatDatetime(utcNow('yyyy-MM-dd'))}' or PTO_x0020_End_x0020_Date eq '@{formatDatetime(utcNow('yyyy-MM-dd'))}' or (PTO_x0020_Start_x0020_Date lt '@{formatDatetime(utcNow('yyyy-MM-dd'))}' and PTO_x0020_End_x0020_Date gt '@{formatDatetime(utcNow('yyyy-MM-dd'))}')

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • Redux014 Profile Picture
    2 on 11 Mar 2024 at 11:37:37
    Re: List Dates Between in a Date Range

    If I understand correctly, this would only check if the PTO date matches the start/end dates. I need to know the if it's also in between the dates and return it.

  • ManishSolanki Profile Picture
    15,085 Super User 2025 Season 2 on 11 Mar 2024 at 10:26:11
    Re: List Dates Between in a Date Range

    Hi @Redux014 

     

    You could use the below filter query to check if PTO start or end date is the current date:

    PTO_x0020_Start_x0020_Date eq '@{formatDatetime(utcNow('yyyy-MM-dd'))}' or PTO_x0020_End_x0020_Date eq '@{formatDatetime(utcNow('yyyy-MM-dd'))}'

    Pls copy & paste the filter query directly in the flow.

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

     

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2