cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kmason
Level: Powered On

addDays question

Hi,

I have an approval flow that is running and I have used the addDays function to send a follow up email 30 days after the the flow has finished running. 

 

addDays('2018-06-11T10:00:00Z, 30)

 

My Question:

Is there a way to insert a field for Now instead of an actual date and time? My problem is, this works great for today, but what happens when I run this flow a month from now? It will already be 30 days past the time it ran (according to formatting as it stands today). How do I subsitute the '2018-06-11T10:10:00Z for today's date?

 

Thanks!

Kathy

 

3 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: addDays question

Hi @kmason,

 

You could use the expression below to achieve your needs:

 

addDays(utcNow(),30)
 
 
Best regard,
Alice

View solution in original post

kmason
Level: Powered On

Re: addDays question

Thanks Alice, I am going to try that to see how that works. 

 

I appreciate the help.

View solution in original post

Administrator
Administrator

Re: addDays question

Hello, @kmason !

 

Have you had a chance to apply @v-yuazh-msft‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!

 

 

Thank you for being an active member of the Flow Community!

 

-Gabriel

Flow Community Manager

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!

View solution in original post

6 REPLIES 6
Highlighted
Super User
Super User

Re: addDays question

Hi @kmason

 

If you want to use the current date and time, or just the current date, you can use the utcNow() function. The only thing you need to keep in mind is that the date and time will be in UTC and you have to adjust it to your current time zone. I think the simplest way is to use the Date Time - Convert time zone action. In the Base time field, you can add the utcNow() function from the Expression tab. In the Source time zone dropdown, select (UTC) Coordinated Universal Time. In the Destination time zone, select your time zone. And in the Format string, you can either select a pre-defined format or enter a custom one by selecting Enter custom value.

 

Once yout get the output from the step above, you can then work on the addDays() to add the 30 days as needed. Please check out the screenshot below for an example, and let us know if you have any questions.
TimeZone.JPG

 

Regards,


Fausto Capellan, Jr


Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

Proud to be a Flownaut!


Community Support Team
Community Support Team

Re: addDays question

Hi @kmason,

 

You could use the expression below to achieve your needs:

 

addDays(utcNow(),30)
 
 
Best regard,
Alice

View solution in original post

kmason
Level: Powered On

Re: addDays question

Thanks Alice, I am going to try that to see how that works. 

 

I appreciate the help.

View solution in original post

Administrator
Administrator

Re: addDays question

Hello, @kmason !

 

Have you had a chance to apply @v-yuazh-msft‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!

 

 

Thank you for being an active member of the Flow Community!

 

-Gabriel

Flow Community Manager

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!

View solution in original post

Anonymous
Not applicable

Re: addDays question

@faustocapellanj  how do you add days in coverted time zone?

 

Super User
Super User

Re: addDays question

Hi @Anonymous 

After you do your Convert Time Zone action, you can do the addDays() with the output from the Convert Time Zone in subsequent actions by building the expression below:

addDays(body('Convert_time_zone'), 30)

I hope this answers your question.


Fausto Capellan, Jr


Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

Proud to be a Flownaut!


Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Kudoed Authors (Last 30 Days)
Users online (5,936)