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 / check whether date is ...
Power Automate
Unanswered

check whether date is within 90 days of current date in filter query

(0) ShareShare
ReportReport
Posted on by 38

Hi all,

I'm trying to add a filter in the filter query to check if a given record is within 90 days of the current date. I came up with the current code:

less(int(split(dateDifference(testDate,utcNow()), '.')), 90)

 

But when I run the Power Automate flow, it gives me a bad request error. I was wondering whether the above is correct to check for dateDiff?

 

Jason

 

Categories:
I have the same question (0)
  • janessanelson Profile Picture
    34 on at

    I found that Power Automate has some issues with referencing between two dates. I have had a lot more success converting the dates into "ticks". 

     

    I do this with a few extra steps, but it works every time when I do it this way. 

     

    1) Create a compose action for "Current Date": use the expression: Ticks(utcNow()). 

    2) Create a compose action for "90 Days": use the expression Ticks(adddays(utcnow, -90, 'MM/dd/yyy'))

    3) You can then reference these two outputs in your filter query. 

     

    You could potentially combine them all together into one formula if you are feeling bold. Hopefully that helps!

  • Chriddle Profile Picture
    8,443 Super User 2025 Season 2 on at

    In the expression less(int(split(dateDifference(testDate,utcNow()), '.')), 90) you are trying to convert an array to an integer 😉

     

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard