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 / How can i get the mont...
Power Automate
Unanswered

How can i get the month in string on a date 20 days ago from now

(0) ShareShare
ReportReport
Posted on by 4

Hi, 

I am trying to get  the month in string on a date 20 days ago from now

Here is the expression I tried in my flow:

 

addDays( formatDateTime(utcNow(), 'dd-mm-yyyy'), -20)
 
But I get an error saying 
 
In function 'addDays', the value provided for date time string '15-28-2020' was not valid. The datetime string must match ISO 8601 format.'.
 
Can you please tell me if there is another way to do this?
Categories:
I have the same question (0)
  • RobElliott Profile Picture
    10,418 Super User 2026 Season 1 on at

    Hi @sacheu in Power Automate months are always in upper case MM. Lower case is for minutes. One way to get just the month is to use a Convert time zone action:
    MM.png

    The output of MM will be 12, MMM will give you Dec and MMMM December and you can use the Converted Time output in follow-on actions.

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

     

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

    Hi @sacheu ,

     

    You could take a try with expression below to achieve the requirement:

    formatDateTime(addDays(utcNow(),-20),'MM')

    Please let me know if your problem could be solved.

     

    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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard