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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get events (V4) filter...
Power Automate
Unanswered

Get events (V4) filter query to events that start, end or occur on current day

(0) ShareShare
ReportReport
Posted on by 2

Hi all, I'm using a flow that attempts to retrieve any/all events from an outlook calendar that are occurring on the same day that a Recurrence runs, once per day.

 

Right now the get events block is using a Filter query shown below

Screenshot 2024-02-13 at 5.35.24 PM.png

 

The flow functions perfectly when run on days that match the start or end date of an event, however I haven't been able to figure out how to also include multi-day events that are occurring (not starting or ending) on a given day in this filter.

 

For example, if a multi-day, all day event starts on Feb. 13, and ends on Feb. 17, the get events block will retrieve the event correctly on those dates, but will not retrieve the event on Feb. 14-16. Anyone have input on how to set this up? Thanks!

Categories:
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @ekoch ,

    I think you are missing the boundary condition.

    Try this filter

    startDateTime le 'Target Date' AND endDateTime ge 'Target Date'
  • ekoch Profile Picture
    2 on at

    Thanks Sudeep! That worked great for pulling in multi-day events. However, the filter is now excluding events that start on or end on the target date. For example running a test today Feb. 14, an event that runs Feb. 13-Feb. 15 is retrieved, however a single day event that starts and ends on Feb. 14 is not retrieved. Any suggestions?

     

    Here is the updated filter:

    Screenshot 2024-02-14 at 9.24.12 AM.png

  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    I think you are having those issues due to the time component.

    The timezone conversion might cause you filter to fail.

    To account for potential issues with timezones and ensure that your filter correctly includes multi-day events occurring on a given day, you can adjust the filter to compare the start and end dates of events with the target date, considering the timezone offset.

    Convert the target date to UTC to ensure consistency across timezones. You can use the "Convert time zone" action to convert the target date to UTC. Apply the filter then

    startDateTimeUtc <= 'Target Date UTC' AND endDateTimeUtc >= 'Target Date UTC'

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 445

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 300

Last 30 days Overall leaderboard