cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Passing today's date as a paramter

I have a Stored Procedure tied to a recurring flow.  The flow creates an HTML Table then emails the results.  This works fine as long as the Date parameter is set within the Stored Procedure (Hard-Coded).  However I want to be able to pass in Today's date every day so I don't have to change the date in the query.  How can I pass that in there automagically?

 

Screen Shot 2019-09-12 at 12.43.19 PM.png

5 REPLIES 5
Super User
Super User

Re: Passing today's date as a paramter

Hi @Anonymous 

 

Use expression utcNow() function.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Anonymous
Not applicable

Re: Passing today's date as a paramter

My problem with that is it returns 2019-09-13.  My power apps pushes Now() when the button is pushed.  So for everything submitted for today's batches, 31 have the date of 2019-09-12 and 1 has the date of 2019-09-13.  The date selector in my power apps is configured for UTC, should I change that to local? even then I don't think it will grab all the data for the date.  

 

I am in Honolulu.  I want this flow to run daily at 11:50pm local time and pass in today's date.

 

Thanks for the reply

Anonymous
Not applicable

Re: Passing today's date as a paramter

Capture.PNG

 

This is what I had to to and now it works just as expected.

Anonymous
Not applicable

Re: Passing today's date as a paramter

So the issue is that the DB is set for UTC time.  That can not be changed.  So what I did was say Date: Now()-.416 which gives me the current local hawaii time and it pushes to the DB correctly.

Community Support Team
Community Support Team

Re: Passing today's date as a paramter

Hi @Anonymous,

 

You could also use the addHours function to convert the timestamp, cause Hawaii is USA (GMT-10), so, you can create an addHour expression:

addHours(utcNow(),-10,'yyyy-MM-dd')

Annotation 2019-09-16 162143.png

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (5,820)