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
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (2,144)