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 doesn't retr...
Power Automate
Answered

Get Items doesn't retrieve anything based on the filter query

(0) ShareShare
ReportReport
Posted on by 12

I have a flow to send email reminder based on the entries from the Microsoft Lists. It will get today's date and compare with the date column from Microsoft Lists. It will send an email reminder if the condition is met. 

 

I had manually checked that there are two entries that the date are today but the Get Items didn't retrieve them.

DGI_IT_0-1662949088234.png

 

DGI_IT_2-1662949170866.png

 

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at

    Hi @DGI_IT ,

     

    Could you please tell me:

     

    What is Nomination ? Is it a Date and Time column?

    What is your SP site's time zone?

     

    Please try:

     

    Nomination ge '@{utcNow('yyyy-MM-dd')}T00:00:00Z' and Nomination le '@{utcNow('yyyy-MM-dd')}T23:59:59Z'

     

    In addition, if the time zone of this SP site is not UTC0, then you will also need to adjust the time range of the filter according to the time zone of this SP site.

     

    Best Regards,

    Bof

     

  • DGI_IT Profile Picture
    12 on at

    Hi Bof,

     

    It is Nomination_Date and it is date and time format on Microsoft Lists.

    My SharePoint site's default timezone is UTC+0.

    I use the current time and convert time zone function then change the format to be d/M/yyyy.

    DGI_IT_1-1662952014173.png

     

    DGI_IT_0-1662951892137.png

     

  • v-bofeng-msft Profile Picture
    on at

    Hi  @DGI_IT ,

     

    Please set the filter query to:

     

    Nomination_Date ge '@{formatDateTime(body('Conver_time_zone'),'yyyy-MM-dd')}T00:00:00Z' and Nomination_Date le '@{formatDateTime(body('Conver_time_zone'),'yyyy-MM-dd')}T23:59:59Z'

     

    Best Regards,

    Bof

     

     

     
  • DGI_IT Profile Picture
    12 on at

    Hi Bof,

     

    Thanks for your prompt reply. The Get Items is not returning empty entries now but it retrieves tomorrow's entries. The image below is the email reminder from the flow and it is retrieving tomorrow (13/9/2022) entries. However, the filter query seems correct. 

    DGI_IT_0-1662953494195.png 

    DGI_IT_2-1662953632311.png

     

     

     

  • v-bofeng-msft Profile Picture
    on at

    Hi @DGI_IT ,

     

    Please check the SharePoint site's Time Zone.

    vbofengmsft_0-1662960273649.png

     

    vbofengmsft_1-1662960364798.png

     

     

    Best Regards,

    Bof

     

  • DGI_IT Profile Picture
    12 on at

    Hi Bof,

     

    I have changed the time zone to UTC+8 and update the source time zone in convert time zone function. But the Get Items still retrieve tomorrow's entries.

    DGI_IT_0-1662962320312.png

    DGI_IT_1-1662962425821.png

     

  • v-bofeng-msft Profile Picture
    on at

    Hi @DGI_IT ,

     

    First, there is no need to change the time zone to UTC+8 , it's just my SP site's setting. If you can change the time zone, please set it to UTC+0.

    Second, after you changed the time zone please check the SP list again , cause the date time value will be changed with the time zone you selected.

     

    Best Regards,

    Bof

     

  • DGI_IT Profile Picture
    12 on at

    Hi Bof,

     

    I try to change back the time zone to UTC+0 and the date time of Nomination_Date does change as well. Then I changed the time zone to UTC+8 again, removed all the entries in the Microsoft Lists and reimported all the data from an excel file. So now everything should be in UTC+8.

     

    But when I run the flow again, it still retrieves data on 13/9/2022 instead of today (12/9/2022).

    DGI_IT_0-1662966169684.png

     

  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @DGI_IT ,

     

    Please try:

     

     

    Nomination_Date ge '@{formatDateTime(addDays(body('Conver_time_zone'),-1),'yyyy-MM-dd')}T16:00:00Z' and Nomination_Date le '@{formatDateTime(body('Conver_time_zone'),'yyyy-MM-dd')}T15:59:59Z'

     

    Best Regards,

    Bof

  • DGI_IT Profile Picture
    12 on at

    Hi Bof,

     

    Thanks for your assistance! It worked for me. 

     

    I found out that the date time imported from excel to Microsoft Lists will be stored as UTC+0. Hence, the date time in Microsoft Lists are actually 8 hours slower than the date time in my Excel file. 

     

    Source article: Power Automate:なぜ9時間先行する?ExcelデータをSharePointにインポートしたらタイムゾーン差異の内容と対処法 (artisan.jp.net)

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard