cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simms7400
Post Prodigy
Post Prodigy

Issue with filtering SP List

Hello Folks -

 

I'm having an issue filtering a SP List.  I have a flow that should retrieve all row items from a SP greater than or equal to a certain date.

 

My "Filter Query" on my Get Items is as follows:

 

 

Create ge 'formatDateTime(addDays(utcNow(),variables('DayOfWeekVar')),'yyyy-MM-dd')'

 

 

 

My day of DayofWeekVar is currently set to -3.  Therefore, it reads:

 

 

Created ge '2020-11-23'

 

 

However, I have items in the list where Created date is 11/25.  What would be the reason those rows are not returning?

 

FYI:

Content TypeApp Created ByApp Modified ByAttachmentsWorkflow Instance IDFile TypeCreated
Item     11/25/2020
Item     11/25/2020
1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @simms7400,

 

Have you done any formatting or conversion with your Created field? Otherwise it probably still is in UTC time format.

 

Try and change the formatting of your expression to UTC instead:

Created ge 'formatDateTime(addDays(utcNow(),variables('DayOfWeekVar')),'yyyy-MM-ddTHH:mm:ssZ')'

https://support.microsoft.com/en-us/help/4557244/converting-time-zone-in-microsoft-power-automate

 

 

View solution in original post

5 REPLIES 5
Expiscornovus
Super User
Super User

Hi @simms7400,

 

Have you done any formatting or conversion with your Created field? Otherwise it probably still is in UTC time format.

 

Try and change the formatting of your expression to UTC instead:

Created ge 'formatDateTime(addDays(utcNow(),variables('DayOfWeekVar')),'yyyy-MM-ddTHH:mm:ssZ')'

https://support.microsoft.com/en-us/help/4557244/converting-time-zone-in-microsoft-power-automate

 

 

abm
Super User
Super User

Hi @simms7400 

 

Interesting question. I never had issues with the above format which you using. I just tried now and I am getting the results as expected. Could you please try MM-dd-yyyy format and see whether that works?

 

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
Power Automate Video Tutorials
tom_riha
Super User
Super User

Hello @simms7400 ,

try to add 'Compose' action after the 'Get items' and put the 'Created' dynamic content inside. This way you'll see in the flow run history what format the 'Created' date has and you can adjust the format in the expression on the right side of the condition accordingly. 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
simms7400
Post Prodigy
Post Prodigy

Thank you everyone. It seems to be a combination of the date format as well as UTC format.  It is now working correctly. Thank you for all of your help!!!

Hi @simms7400 

 

Could you please explain what exact fixes you did to resolve this? That would help others if they looking for similar issue.

 

Thanks a lot



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
Power Automate Video Tutorials

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,432)