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

 

 

View solution in original post

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,608)