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

Using the DateAdd Function to Subtract a Day from UTCNow

I  have a Flow that is set to run once a day. I am trying to capture historical data on a daily 24 hour basis. Inside my GET Request API URl I need to specify the date ranges (Start & End UTC).  I have initialized Variables that can call My End-date UTC is = Utcnow(). I need to set my Start-date UTC to 24 hours prior to whenever the End-date Utcnow() is set. I am aware of the ability to use the Dateadd function but I keep running into errors. 

Flow a.JPG

Flow b.JPG

3 REPLIES 3
RobElliott
Super User
Super User

@Anonymous one alternative way to do it is to use the Get past time action and set it to 1 day.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

Hi @Anonymous ,

 

Use Expression and use 

addDays(utcNow(),-1)
 
Thanks
Anonymous
Not applicable

This works perfectly! Thank you all so much.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,222)