Skip to main content

Notifications

Community site session details

Community site session details

Session Id : IsFSe6XlvQs3ZTI1hUPXvX
Power Automate - Building Flows
Unanswered

Filter Query - Get Rows from SQL Server

Like (0) ShareShare
ReportReport
Posted on 21 Sep 2020 12:21:31 by

Hi everyone, 

I want to Get Rows from SQL Server that have been created precisely three days ago.

The data type of the column in SQL is date (no time). 


I tried the following, and the flow ran successfully, but I don't get any rows?

Date_x0020_Install eq '@{addDays(utcnow('yyyy-MM-dd'),-3)}'

 

The name of the column in SQL has space. That's why I have added "_x0020_".

 

seryil_0-1600690669438.png

 

Thank you in advance 🙂

 

  • ChristianAbata Profile Picture
    8,947 Most Valuable Professional on 25 Sep 2020 at 12:46:52
    Re: Filter Query - Get Rows from SQL Server

    @Anonymous  could you share an screanshot?

  • Community Power Platform Member Profile Picture
    on 25 Sep 2020 at 08:07:11
    Re: Filter Query - Get Rows from SQL Server

    Hi @ChristianAbata 

    I tried both expressions, and it still doesn't work.

     

    Date_x0020_Install eq '@{concat(addDays(utcnow(),-3,'yyyy-MM-dd'),'T00:00:00Z')}'
     
    Date_x0020_Install eq '@{first(split(addDays(utcnow('yyyy-MM-dd'),-3),'T')))}'


    I hope there is a solution to this. 

     

  • ChristianAbata Profile Picture
    8,947 Most Valuable Professional on 22 Sep 2020 at 16:30:34
    Re: Filter Query - Get Rows from SQL Server

    @Anonymous  please try with the other action

  • Community Power Platform Member Profile Picture
    on 22 Sep 2020 at 14:07:32
    Re: Filter Query - Get Rows from SQL Server

    @ChristianAbata I get all rows now, but still doesn't work. I tried to hardcode it with the following expression: Date_x0020_Install eq '2020-09-19T00:00:00Z' and that doesn't work either. The filter works with normal text columns but not date 😞


  • ChristianAbata Profile Picture
    8,947 Most Valuable Professional on 22 Sep 2020 at 13:41:53
    Re: Filter Query - Get Rows from SQL Server

    ohhh @Anonymous  please try to configure this 

    excel.PNG

  • Community Power Platform Member Profile Picture
    on 22 Sep 2020 at 13:30:55
    Re: Filter Query - Get Rows from SQL Server

    @ChristianAbata Doesn't work either. But I removed the filter and tried to search after the specific date in the output with CTRL + F, and it seems like I don't get all the rows from SQL. 

    If I search "Date_x0020_Install", then it can only find 1689 rows, and I have a lot more rows in the table in SQL.

     

    seryil_0-1600781273509.png

     

    Can it be true that there is a limit?

  • ChristianAbata Profile Picture
    8,947 Most Valuable Professional on 22 Sep 2020 at 13:12:11
    Re: Filter Query - Get Rows from SQL Server

    weird @Anonymous  just to test something more, could you leave your SQL silter empty and then after this action can you add a filter array and test with the expression that I gave you?

     

    ChristianAbata_0-1600780306166.png

    filter array.PNG

  • Community Power Platform Member Profile Picture
    on 22 Sep 2020 at 13:05:23
    Re: Filter Query - Get Rows from SQL Server

    @ChristianAbata Yes, I have data from that date. 

     

    seryil_0-1600779890674.png


    You had a colon between T and 0 in your expression. I assume that is incorrect?
    I removed it, and it still doesn't work. 

  • ChristianAbata Profile Picture
    8,947 Most Valuable Professional on 22 Sep 2020 at 13:01:24
    Re: Filter Query - Get Rows from SQL Server

    @Anonymous  please make shure that you have data 19-09-2020 could you do a little search?

  • Community Power Platform Member Profile Picture
    on 22 Sep 2020 at 12:54:53
    Re: Filter Query - Get Rows from SQL Server

    Hi @ChristianAbata,

    Still no output 😞

     

    Date_x0020_Install eq '@{concat(addDays(utcnow(),-3, 'yyyy-MM-dd' ), 'T:00:00:00Z' )}'

     

    seryil_0-1600779274633.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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
Churchy Profile Picture

Churchy 6

#2
Chriddle Profile Picture

Chriddle 4 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 4

Overall leaderboard