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 / SQL "Get rows" filter ...
Power Automate
Unanswered

SQL "Get rows" filter by datetime in a range

(0) ShareShare
ReportReport
Posted on by

Hello everyone,

 

I'm sorry, if this question has been answered before, but I just read countless threads, while still having no solution.

 

I'm trying to fetch specific rows inside of a SQL-table, where the value of a datetime column should be in between of today and 14 days from now.

 

Thank you very much in advance!

Categories:
I have the same question (0)
  • manuelstgomes Profile Picture
    6,625 on at

    Hi @Dribbler31 

     

    The easiest way would be to do a stored procedure with that query and then call it from Power Automate using the "Execute Stored Procedure" action.

     

    The query can be something like this:

    select * from <table> where <date time column> between DATEADD(day,-14,GETDATE()) and getdate()

     

    I'm doing the query from memory, so apologies if the syntax is not 100% correct.

     

    Is this what you need?

     

    Cheers
    Manuel

    ------------------------------------------------------------------
    If I have answered your question, please mark it as "Accept as Solution." It will help other members finding the solution faster. If you like my response, please give it a Thumbs Up. 👍
    Otherwise, reply to it, and the community will do its best to help you.

     

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 291 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 238 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 109 Super User 2026 Season 1

Last 30 days Overall leaderboard