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 Platform Community / Forums / Power Apps / Execute Stored Procedu...
Power Apps
Answered

Execute Stored Procedure (V2) - Parameter Q&A

(0) ShareShare
ReportReport
Posted on by 56

Hi,

I have a SQL SP that can take date values, i.e. @From and @TO

How do I pass in parameters such as: ( cast([Visitor].[Arrivaldatetime] as date) between cast(getdate()-8 as date) and cast(getdate()-1 as date) ) - in other words for @From I want to pass in today()-8 and @TO to be Today()-1 ?

 

Please help. 

 

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Sach2022 ,

     

    It it a powerautomate question?

    Do you want to pass date from flow to stored procedure while the flow is running?

    If so , you could try this:

    vxiaochenmsft_0-1648447785439.png

    vxiaochenmsft_1-1648447799638.png

    If you want to get the date 8 days ago, you could use this expression:

    formatDateTime(addDays(utcNow(),-8),'yyyy-MM-dd')
    If you want to get the date 1 days ago, you could use this expression:
    formatDateTime(addDays(utcNow(),-1),'yyyy-MM-dd')
    vxiaochenmsft_2-1648447964530.png

     

    Best Regards,

    Wearsky

     

  • Sach2022 Profile Picture
    56 on at

    Thank you.

    Just like your screenshot, my SP accepts a few more Params, but the other two are integers and I wish to leave them either as any or null.  While you are at it, how do I specify <>blank (i.e. is not blank, or has an integer value) and null for integer Param types?

    Thanks.

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Sach2022 ,

     

    Sorry i didn't understand your needs.

    Could you explain it?

     

    Best Regards,

    Wearsky

  • Sach2022 Profile Picture
    56 on at

    I've since done it now, thanks for your help. I will accept as a solution. Cheers.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard