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 Automate
Answered

Calculating a Date

(0) ShareShare
ReportReport
Posted on by 133

Hello-

 

I need to find the 1st day of the month 60 days after a particular date.  For instance, if the inputted date was 4/5/2020 + 60 days, I would be looking for 7/1/2020.  I know how to do in excel:  =EOMONTH(A1,2)+1.

 

Any ideas how to accomplish as an formula expression in power automate and place in a variable?  I figure I would use the addDays function like below to add 60 days, but then I don't know how to find the 1st day of the next month.  Do I have to set 2 variables (1) for date + 90, then (2) take the new date variable and use startofMonth expression to get 1st day of that month?  Seems convoluted to do it that way.  Thoughts?

 

addDays(variables('varStartDate'),60)
 
Categories:
I have the same question (0)
  • ganeshsanap Profile Picture
    1,555 on at

    @robgar , you can use startOfMonth function to get the start (1st day) of the month for a timestamp.

     

    startOfMonth('2018-03-15T13:30:30Z')

     

    above formula returns this result: "2018-03-01T00:00:00.0000000Z"

     

    startOfMonth('2018-03-15T13:30:30Z', 'yyyy-MM-dd')

     

    And it returns this result: "2018-03-01"

    ReferenceFunctions Reference - startOfMonth  


    Please click Accept as solution if my post helped you solve your issue. This will help others find the correct solution easily. It also closes the item. If the content was useful in other ways, please consider giving it 👍

  • Verified answer
    v-alzhan-msft Profile Picture
    Microsoft Employee on at

    Hi @robgar ,

     

    You could refer to screenshot below to create the flow:

    1.png

    formatDateTime(addToTime(addDays(outputs('Compose'),60), 1, 'Month'),'yyyy-MM-01')

    The flow would run successfully as below:

    2.png

     

    Best Regards,

    Alice

     

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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 976

#2
Valantis Profile Picture

Valantis 863

#3
Haque Profile Picture

Haque 547

Last 30 days Overall leaderboard