Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Get Items Filter Query Not Working - UK Dates

(0) ShareShare
ReportReport
Posted on by

Hi,

I have built a Flow that copies Items, that are older than 30 days, from one SharePoint list to another and then deletes the Items from the original list. Problem is the dates in the SharePoint list are in UK format (mm-dd-yyyy). I had initial problems using the following formula as a filter query: addDays(utcnow('mm-dd-yyyy'),-30) so after lots of searching around I thought I stumbled on a solution using this formula instead:

addDays(converttimezone(utcnow(),'UTC','W. Europe Standard Time','dd/mm/yyyy HH:mm),-30)

When I run the Flow I receive no error but the date filter appears to be getting ignored and 100 items are coped and deleted at a time despite the items being within the 30 period.Flow1.JPG


    Flow2.JPG
  Any help much appreciated

 

thanks

 

Mike

  • Community Power Platform Member Profile Picture
    on at
    Re: Get Items Filter Query Not Working - UK Dates

    Thanks ABM,

     

    I tried a slight variation of your formula: addDays(formatDateTime(utcNow(),'MM-dd-yyyy'),-30)

    and it works

     

    many thanks!

     

    Mike

     

     

  • Verified answer
    abm abm Profile Picture
    32,506 Most Valuable Professional on at
    Re: Get Items Filter Query Not Working - UK Dates

    Hi @Anonymous 

     

    Try this expression

     

    addDays(formatDateTime(utcnow(), 'yyyy-MM-dd'),-30)

     

    Thanks

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

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!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1