web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow: Updating the a D...
Power Automate
Unanswered

Flow: Updating the a Date cell in Excel with its current value + 30 days

(0) ShareShare
ReportReport
Posted on by 26

Hello everyone,

 

I have an excel sheet that is used as input for my Flow, that creates monthly tasks every time the "Due check" column has the status "new task to be created". Two important columns in my excel Sheet are  "Start date" and "Due date". So far so good. I use the Create a task connector, take all the needed values and the task is created.

 

However, once the task was created, I want to update the Start date and Due date with the dates for the next month, for example, if the start date in the excel file was 19.12.2019 when the flow runs, I would like the newly updated cell to be 19.01.2019. In order to update the cell in excel, I use the following expression in the "Start Date" filed: formatDateTime(addDays('Start Date',30),'yyyy-MM-dd'), in the "Update a row" step.

Excel file.JPGUpdate a row.JPG

 

 

Update a row 2.JPG

Categories:
I have the same question (0)
  • Verified answer
    MattWeston365 Profile Picture
    1,701 on at

    Hi @Bogdan_brg the reason is because the reference you have to start date is not fully formed. Effectively you are passing in the string 'Start Date' rather than the full expression reference. As 'Start Date' is a string, it is not able to successfully run the expression. If you delete the 'Start Date' piece, place the cursor there, and then press dynamic content on the top then you'll be able to select the dynamic content you want there.

     

    It should look something like: triggerBody()?['Start_Date'] depending on where the content comes from.

  • v-bacao-msft Profile Picture
    on at

     

    Hi @Bogdan_brg ,

     

    According to the error message, this error occurs because the format of the Start Date field value is dd-MM-yyyy, which is an unsupported format in the formatDateTime() function.

    Maybe you could consider changing the date format to MM-dd-yyyy format so that this error can be resolved.

     

    Best Regards,

  • Bogdan_brg Profile Picture
    26 on at

    Thank you Matt! The solution worked and things look good now.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard