web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Items with Date Fi...
Power Automate
Unanswered

Get Items with Date Filter is not working

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I have a SharePoint List with a date and time column called 'Date'. I wanted to get items for the given date. It is not working. Please assist me.

 

SivaMani_0-1638506754820.png

SharePoint:

SivaMani_1-1638507048917.png

 

Categories:
I have the same question (0)
  • VJR Profile Picture
    7,635 on at

    Hi @SivaMani 

     

    In this post it says that for dates used in query it takes the internal sharepoint name and another post in the same thread says that it worked fine when the column name was changed from "Date" to something else.

     

    https://powerusers.microsoft.com/t5/Building-Flows/FLOW-Get-Items-Filter-SharePoint-list-on-Date/td-p/85238

     

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @SivaMani 

    You must use the following date format in your filter query:  yyyy-MM-dd

    So, todays date would be 2021-12-03

    @VJR is correct in that you must use a columns internal name.  An easy way to see the internal name is to go to the list settings and click on the column name.  The internal name will be at the end of the URL after Field=

     

     

  • Community Power Platform Member Profile Picture
    on at

    Thanks for your response, @VJR, and @ScottShearer.

     

    Internal Field Name  /_layouts/15/FldEdit.aspx?List=%7BE34BAF39-BF7B-4062-8CD2-716A897ABC46%7D&Field=Date

     

    As you see in the screenshot, I entered the date in yyyy-MM-dd format. It is still not working. Anything else I am missing?

     

  • VJR Profile Picture
    7,635 on at

    Hi @SivaMani 

     

    Did you check the posts in the link I shared thoroughly?

    There's a post that says about formatting the date. The date format in your sharepoint list is different than the one in the Query. I'm not sure if that is one of the reasons.

     

    Also in the same thread another post says that it worked fine when the column name was changed from "Date" to something else.

    So you need to take time to go through the posts and try out which of the different solutions will work in your case.

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @SivaMani 

    When you say it is not working, do you mean that an error is generated or you just don't' get any results back?

    Double check to be sure that you have selected the correct site and list in your Get Items action please.

    See my example below:

    image.pngimage.pngimage.png

     

     

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    Thanks again @ScottShearer for the detailed explanation.

     

    It didn't give me any results. I found out that it is not the case for all the dates. The time value is playing the role here.

    I have a few records stored, like 12/6/2021 01:00 AM or 12/6/2021 02:00 AM instead of 12/6/2021 12:00 AM. If I correct this, I can see some results. I am not sure whether it is expected behavior. Note: the format is Date only

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @SivaMani 

    That does make a difference.  The easy solution is to change the column to a date only column rather than date and time.  You'll do this in the column settings.  If you don't need the time, that is your best solution.  I just ran a test where I changed the format of the column from Date and Time to Date only and the result was that the time component was removed and the query worked.  

     

    If you want to keep the time you need to say that the date is greater than or equal to Nov 5 and less than Nov 6:

    Date ge '2021-11-05' and lt '2021-11-06'

     

     

  • Community Power Platform Member Profile Picture
    on at

    @ScottShearer It is a date-only column already. I am not sure why it considers time as well.

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @SivaMani 

    Can you post a screen shot of the column setting?  In other words the configuration of the date column?

     

  • Community Power Platform Member Profile Picture
    on at

    Here it is,

     

    SivaMani_0-1638809398044.png

     

     

    SivaMani_1-1638809433227.png

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 506 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 425 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard