cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Flow for Email > To Do Task: Need help assigning a due date +2 days from receipt of task

I successfully built a flow that creates a Microsoft To Do task from an Outlook email. 

 

I want to set a due that is +2 days from the date the To Do task is created.

 

I'm very new to Power Automate, so I'm a rank newbie when it comes to expressions or variables. As they say in one of my favorite sub-Reddits, "Explain to me like I'm 5" ... :^)

 

flow to do task due date +2.jpg

6 REPLIES 6
Highlighted
Super User
Super User

Re: Flow for Email > To Do Task: Need help assigning a due date +2 days from receipt of task

hi @OldFatDog  you need to add a function call addDays() like this addDays('YourDate', 2). 



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted
Frequent Visitor

Re: Flow for Email > To Do Task: Need help assigning a due date +2 days from receipt of task


@ChristianAbata wrote:

hi @OldFatDog  you need to add a function call addDays() like this addDays('YourDate', 2). 


Thanks, Christian. I'm new to using expressions, but it seems like your solution is saying for me to use a "hard-coded" or specific/static start date ('YourDate') rather than (somehow) starting with the date that the task is created... ?

The start day is never a specific/static date. I get about five of these tasks a week, and the due date is always +2 days after I have been assigned the task.

Given that, how do I make it (task creation date +2 days = due date)?

 

Highlighted
Super User
Super User

Re: Flow for Email > To Do Task: Need help assigning a due date +2 days from receipt of task

mmm @OldFatDog  the start day is when you create the task so you can use this formatDatetime(uctNow(),'yyyy-MM-dd') to get the current date and then add 2 days so the full fuctions is like this addDays(formatDatetime(uctNow(),'yyyy-MM-dd'), 2)



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted
Frequent Visitor

Re: Flow for Email > To Do Task: Need help assigning a due date +2 days from receipt of task


@ChristianAbata wrote:

mmm @OldFatDog  the start day is when you create the task so you can use this formatDatetime(uctNow(),'yyyy-MM-dd') to get the current date and then add 2 days so the full fuctions is like this addDays(formatDatetime(uctNow(),'yyyy-MM-dd'), 2)


Okay, I just copied and pasted your function above and it isn't accepting the string as valid. What am I doing wrong?

 

date+2 v3.jpg

Highlighted
Super User
Super User

Re: Flow for Email > To Do Task: Need help assigning a due date +2 days from receipt of task

@OldFatDog  please use only the expresion formatdatetime in a separeted compose an then in other addDays



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted
Community Support
Community Support

Re: Flow for Email > To Do Task: Need help assigning a due date +2 days from receipt of task

 

Hi @OldFatDog ,

 

Please try to use the following expression:

addDays(utcNow(),2,'yyyy-MM-dd')

11.PNG

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
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

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

Top Solution Authors
Top Kudoed Authors
Users online (7,712)