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

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
v-bacao-msft
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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (3,102)