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 / format date and time e...
Power Automate
Answered

format date and time expression only works if flow is not running concurrently

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

HI All, 

 

I am adding data from an email into an excel sheet. 

 

When an email is flagged in a specific folder the data from a table in the body of the email is added to an excel sheet along with the received time of the email. 

 

I have initialised a string variable ('Date') for the received time and used the following expression when adding to an excel cell :

 

formatDateTime(variables('Date'),'dd/MM/yyyy')
 
If there is only one concurrence of the flow I get the correct date format dd/mm/yyyy, if it is running more than once concurrently I get the incorrect date format mm/dd/yyyy.
 
Is this a bug? I am using the received time dynamic content from the trigger so cannot see how the input data could be inconsistent. 
 
 
Categories:
I have the same question (0)
  • Verified answer
    Fredrik_A Profile Picture
    3,455 Super User 2026 Season 1 on at

    Variables doesnt work correctly in loops that run concurrently, use a compose step instead 🙂 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    date.PNGflagged.PNGadd.PNG

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    What do you mean? 

     

    I can remove the apply to each by using a select function but I don't understand what you mean by using compose instead of a variable.

     

    Should I add a compose to format the date and time before the apply to each ?

  • Fredrik_A Profile Picture
    3,455 Super User 2026 Season 1 on at

    Is that loop running concurrently or is it taking 1 at the time?

     

    If its taking 1 (Normal loop) at the time you need to update the variable inside the loop to the current value, otherwise it will have the same value for all items inside the loop. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I tried with the compose outside the loop and got the same issue. 

     

    compose.PNG

     

    Every loop within a run would have the same date as it is taken from the received time of the email, not data in the table.  Although the number of loops per run is variable.

    Each run has a different date as it is triggered by a different email.

     

    Although 

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Sorry, I think I misunderstood the question. 

     

    I am now testing with a concurrency limit of 1 on the loop itself as well as the flow as a whole. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @StretchFredrik I accepted the solution because it worked for the first 3 tests but is now having the same intermittent issue. 

     

    example.PNG

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 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard