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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

Filter Querys SQL

(0) ShareShare
ReportReport
Posted on by 353

Hello,

 

I am trying to Get Rows(V2) from a SQL Server, i need to filter based off of a DateTime sql column that has the format of 2019-08-15 10:17:32.000, i need to get all records that are a day before the current day.   

 

Another Filter as well to get all records that are less than this result 'day before the current day'.

 

To put into an email and show New Records and old records.

 

i got a compose Data operation of 

formatDateTime(addDays(utcNow(), -1),'yyyy/MM/dd'), im getting error when i compare this output to my sql datetime column. If anyone can assist, id appreicate it.
 
Thanks
Categories:
  • Verified answer
    RezaDorrani Profile Picture
    12,145 on at

    Hi @mmattar 

     

    You can add filters by Year Month and Date directly as filter when calling sql

     

    Year(DateColumn) ge @{formatDateTime( utcNow(),'yyyy')} and month(DateColumn) ge @{formatDateTime( utcNow(),'MM')} and day(DateColumn) ge @{formatDateTime( utcNow(),'dd')}

     

    This is just an example

    you can do addDays( utcNow(),-1) for the day part and run above logic

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 315 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 267

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard