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
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (4,832)