Skip to main content
Community site session details

Community site session details

Session Id : 37fWK/x9UDDBI8coYQThXV
Power Automate - Building Flows
Answered

Create a task, date formatting

Like (0) ShareShare
ReportReport
Posted on 29 Jun 2020 06:28:35 by 10

Hi,

 

I am building a flow that is triggered by MS forms.

 

I want to use "submission time" plus 30 days as "Due Date Time".

I have tried many different methods to achieve this, without luck.

 

The most promising methods I have found is to use an expression with "addDays".

I have tried to format the date in this expression, but I can't seem to get it right.

 

Now I am hope some of you can help me get this flow working.

 

  • Verified answer
    v-litu-msft Profile Picture
    on 29 Jun 2020 at 09:59:29
    Re: Create a task, date formatting

    Hi @OttarLM,

     

    @Rahber is correct, there should use the submitDate property to add the time, one point need to correct is the date format should be "yyyy-MM-dd", if the date format is "dd-MM-yyyy", when creating a planner task, it will recognize an invalid date:

    addDays(body('Get_response_details')?['submitDate'],30,'yyyy-MM-dd')

    Annotation 2020-06-29 175624.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Rahber Profile Picture
    1,935 on 29 Jun 2020 at 06:51:26
    Re: Create a task, date formatting

    Hello,

     

    You can use this dynamic expression only for getting the DueDate

    formatDateTime(addDays(body('Get_response_details')?['submitDate'],30),'dd-MM-yyyy')

     

    Please note that body('Get_response_details')?['submitDate'] is the value of the SubmissionTime variable from the response so make sure you are correctly referring it. To get the value move the mouse over variable and it will show you its syntax and then remove the variable and use the custom expression.

    Untitled.jpg

     

     

    Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

    Thanks,

    Rahber

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete