cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Philthebill
New Member

Calculate Date from the past

Hi, 

 

I want to calculate a certain date in the past. I have as Input the Date of today and the parameter for example 10 Years ago. So I want for example 01.01.2021 - 10 Years = 01.01.2011. 

 

I tried different ways, but couldn't get the right result... 

 

Thanks guys!

1 ACCEPTED SOLUTION

Accepted Solutions
MichaelAnnis
Super User
Super User

Here is my best practices article on dates:
https://www.linkedin.com/pulse/power-automate-desktop-pad-best-practices-part-1-date-michael-annis/?...

 

Short story for you solution:  Use the Add to datetime action and go minus 10 years.

MichaelAnnis_0-1639075253331.png

 

View solution in original post

3 REPLIES 3
MichaelAnnis
Super User
Super User

Here is my best practices article on dates:
https://www.linkedin.com/pulse/power-automate-desktop-pad-best-practices-part-1-date-michael-annis/?...

 

Short story for you solution:  Use the Add to datetime action and go minus 10 years.

MichaelAnnis_0-1639075253331.png

 

If you need the first day of this year, follow the article (it has text you can copy and paste at the bottom).  Instead of Beginning Day this Month using %ThisMonth_mm%, just use '01' to represent January.

Thank you very much! You helped me a lot. Appreciate it. Helping others without benefit is a great attitude. 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,981)