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 / Filter array for today...
Power Automate
Unanswered

Filter array for today's events

(0) ShareShare
ReportReport
Posted on by
I'm using Get Calendar View of Events (V3), and I'm using a filter array to just show today's events. I've been around and around with this, and can't figure it out. I'm getting yesterday's all-day events, and tomorrow's all-day events.
 
Here's my filter:
@and(
    or(
        and(
            not(equals(item()?['isAllDay'], true)),
            lessOrEquals(
                convertFromUtc(formatDateTime(item()?['start'], 'yyyy-MM-ddTHH:mm:ssZ'), 'Eastern Standard Time'),
                formatDateTime(convertFromUtc(utcNow(), 'Eastern Standard Time'), 'yyyy-MM-ddT23:59:59')
            ),
            greaterOrEquals(
                convertFromUtc(formatDateTime(item()?['end'], 'yyyy-MM-ddTHH:mm:ssZ'), 'Eastern Standard Time'),
                formatDateTime(convertFromUtc(utcNow(), 'Eastern Standard Time'), 'yyyy-MM-ddT00:00:00')
            )
        ),
        and(
            equals(item()?['isAllDay'], true),
            lessOrEquals(
                convertFromUtc(formatDateTime(item()?['start'], 'yyyy-MM-ddTHH:mm:ssZ'), 'Eastern Standard Time'),
                formatDateTime(convertFromUtc(utcNow(), 'Eastern Standard Time'), 'yyyy-MM-ddT23:59:59')
            ),
            greaterOrEquals(
                convertFromUtc(formatDateTime(item()?['end'], 'yyyy-MM-ddTHH:mm:ssZ'), 'Eastern Standard Time'),
                formatDateTime(convertFromUtc(utcNow(), 'Eastern Standard Time'), 'yyyy-MM-ddT00:00:00')
            )
        )
    )
)
Please help!
Categories:
I have the same question (0)
  • Suggested answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at
    Please try this
     
    @and(
        or(
            and(
                not(equals(item()?['isAllDay'], true)),
                lessOrEquals(
                    convertFromUtc(item()?['start'], 'Eastern Standard Time'),
                    formatDateTime(convertFromUtc(utcNow(), 'Eastern Standard Time'), 'yyyy-MM-ddT23:59:59')
                ),
                greaterOrEquals(
                    convertFromUtc(item()?['end'], 'Eastern Standard Time'),
                    formatDateTime(convertFromUtc(utcNow(), 'Eastern Standard Time'), 'yyyy-MM-ddT00:00:00')
                )
            ),
            and(
                equals(item()?['isAllDay'], true),
                lessOrEquals(
                    formatDateTime(convertFromUtc(item()?['start'], 'Eastern Standard Time'), 'yyyy-MM-dd'),
                    formatDateTime(convertFromUtc(utcNow(), 'Eastern Standard Time'), 'yyyy-MM-dd')
                ),
                greaterOrEquals(
                    formatDateTime(convertFromUtc(item()?['end'], 'Eastern Standard Time'), 'yyyy-MM-dd'),
                    formatDateTime(convertFromUtc(utcNow(), 'Eastern Standard Time'), 'yyyy-MM-dd')
                )
            )
        )
    )
     

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard