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 / Filter SQL Server on-p...
Power Automate
Answered

Filter SQL Server on-premises with datetime

(0) ShareShare
ReportReport
Posted on by 78

I am creating a flow to return a certain row, in the flow i need to filter by datetime (date with time). how do i achieve that ? I need to get data from 'counter=2' where i can't use this condition as filter query because it will integrate to Microsoft Form and User doesn't need to input/know the unique ID, on my form for filter are "Date" component as the Time I am using a "Text" component

Iam using server on prem

Cap1.PNGCap2.PNG

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

    Hi @Trinaintynine,

     

    What do you mean by using the time the user fills in the form as a filter to get rows?

    You could use the corresponding Dynamic content of the Forms output as a condition.

    Image reference:

    19.PNG

     

    Best Regards,

  • Trinaintynine Profile Picture
    78 on at

    Thanks for replying

    In my case is about user/client do a shifting time to teach a class, so they need to input the date and time when they're available to teach. and in my flow in need to search if the class is available or not.

    so in my form, I made this question.
    Cap3.PNG

    the problem is how do i filter column "Time Start with these answer" ? , for now I'm trying to filter it by "convert those answer into converttotime". but i keep on failing to convert it

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

    Hi @Trinaintynine,

     

    You could use Expression to organize the user-submitted Cover Date and Cover Time into the same format as the timeStart column, and then configure Filter query.

    Expression reference:

    concat(body('Get_response_details')?['r2688fcec52ca4f0ca9df50a360a16e2d'],' ',concat(body('Get_response_details')?['r28eb1dc8d0eb408786cc0f52e0f7f58b'],'.000'))

    The parameters in Expression are configured using Dynamic content in your Flow. The second parameter is a space.

    5.PNG4.PNG

    6.PNG

    Finally, the time of Compose output is used as a filter condition. Note that need to add single quotes to the outside.

    Please take a try.

     

    Best Regards,

  • Verified answer
    Trinaintynine Profile Picture
    78 on at

    thanks for your answer..

    somehow i find a post with another filter syntax. and i have tried it and it works too
    here's the following

    Cap4.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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard