cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User III
Super User III

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


@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)?

 

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


@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

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

 

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (11,416)