cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Get Items Filter Query Not Working - UK Dates

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Get Items Filter Query Not Working - UK Dates

Hi @mikiepat 

 

Try this expression

 

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

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: Get Items Filter Query Not Working - UK Dates

Hi @mikiepat 

 

Try this expression

 

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

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

Highlighted
Helper I
Helper I

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

 

 

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (5,643)