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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Auto increment a date ...
Power Automate
Answered

Auto increment a date in Power Automate

(0) ShareShare
ReportReport
Posted on by 802

Hi there,

 

I have a Desktop flow which runs a VS Code (Powershell) script in the night via unattended RPA add-on, takes the output file and uploads it to OneDrive for Business. This works all good.

 

However, in the VS Code script, there are date parameters for the script we are running of

 

start-date: 2022-04-11
end-date: 2022-04-20

 

Is there a way I can tell the Desktop flow to increment each of the above dates by one day every time it runs?

 

Thanks

K.

I have the same question (0)
  • Verified answer
    Pavel_NaNoi Profile Picture
    1,074 on at

    A quick trick you can pull off is to first set a date to one just before the current date and then use the "Get Current date and Time" action, subtract those dates using the "Subtract Dates" action which will give you their difference and then simply add the subtracted days into your dates above using the "Add to datetime" action.

     

    Now what this will do is the following: Once it runs it will find the difference between the current date and the date you've set, this will be added onto your dates, once the next day occurs the automation will once again find the difference between the current date and the fixed date you've set, but the current date has changed by 1 day, thus your dates will now be increased by 2, and this will repeat infinitely, adding 1 day difference each time a day passes.

     

    Other than that you could probably get something to work using Power Automate if you can use that.

     

    Hope this helps!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 229 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 227

#3
Haque Profile Picture

Haque 181

Last 30 days Overall leaderboard