cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

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
Highlighted
Community Support
Community Support

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

Highlighted
Helper III
Helper III

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

Highlighted
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
Community Manager
Microsoft Power Automate | Power Virtual Agents
Are YOU a member of a Power Platform User Group?
Fill out This Form to claim your Community User Group Member Badge!

View solution in original post

6 REPLIES 6
Highlighted
Memorable Member
Memorable Member

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!
Highlighted
Community Support
Community Support

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

Highlighted
Helper III
Helper III

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

Highlighted
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
Community Manager
Microsoft Power Automate | Power Virtual Agents
Are YOU a member of a Power Platform User Group?
Fill out This Form to claim your Community User Group Member Badge!

View solution in original post

Highlighted
Anonymous
Not applicable

Re: addDays question

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

 

Highlighted
Memorable Member
Memorable Member

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!

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

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

Users online (3,480)