cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NeonThunder
Advocate I
Advocate I

SharePoint Get Items using DateFrom and DateTo not returning results?

Hi there I have a SharePoint list with 2 date columns, Datefrom and DateTo...

 

When I use the Get Items connector, I can get everything DateFrom or list everything just using DateTo.  But trying to get every in-between isn't working?

 

Here is my filter....

 

 

 

 

DateFrom ge '@{variables('WeekStart')}' and DateTo le '@{variables('WeekEnd')}' 

 

 

 

 

The variables for WeekStart and WeekEnd are outputted in the query as...

 

 

 

 

DateFrom ge '2022-07-14T15:40:58.2178864Z' and DateTo le '2022-07-18T15:40:58.2803909Z' 

 

 

 

 

yet despite there being records between these dates, nothing shows.  If I leave out the and clause and just have DateFrom, it will list everything in the future just fine.  But when adding the le from DateTo it doesn't find anything?

 

Here are my Sharepoint columns, I thought the space between might causing issues but DatefromDateto works just fine when querying in isolation.

 

NeonThunder_0-1657555071549.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
ScottShearer
Super User
Super User

@NeonThunder 

I could be misunderstanding, but your "Date from" shows as 11 July.  Your query asks for anything where the date from is greater than or equal to 14 July.  The items that you have highlighted does not match your criteria.

Also, you might want to format your dates as yyyy-MM-dd so as not to include the time.

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

2 REPLIES 2
ScottShearer
Super User
Super User

@NeonThunder 

I could be misunderstanding, but your "Date from" shows as 11 July.  Your query asks for anything where the date from is greater than or equal to 14 July.  The items that you have highlighted does not match your criteria.

Also, you might want to format your dates as yyyy-MM-dd so as not to include the time.

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Thanks, good shout on the date format.  

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,342)