web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Converting a date from PowerApps using Compose

(0) ShareShare
ReportReport
Posted on by 60

Hi all,

 

I have been taking in a date through PowerApps from the Datepicker in the form dd/mm/yyyy. 

I have been trying to format it using Compose in Flow to output the form yyyy-MM-dd.

 

"@formatdatetime(triggerBody()?['Sendapprovalemail_Body'],'yyyy-MM-dd')"

 

For some reason the days and the months switch around. Its as if it reads 'MM' as 'dd' and 'dd' as 'MM'. 

I get the same result each time after changing around the formats several times in both Compose and PowerApps.

 

eg. Input from PowerApps is 14/06/2017 and output from Compose is 2017-14-06, but it throws an error as its not possible to have MM as 14. It should be outputting 2017-06-14.

 

Any help on trying to resolve this would be great, thanks.

I have the same question (0)
  • gamoraes Profile Picture
    1,040 on at
    Re: Converting a date from PowerApps using Compose

    Hi @E-Mac

     

    Can you post prints of your flow. How you did and the result you got?

     

    Best Regards,

     

    Gustavo Moraes

  • v-micsh-msft Profile Picture
    on at
    Re: Converting a date from PowerApps using Compose

    Hi @E-Mac,

     

    Would you please share more information about the string input under PowerApps, along with the flow configuration (Better screenshots)?

    Is the control you used under PowerApps a TextInput box, or a DatePicker control?

    In addition, for the flow.run () formula, please take a try to add a text() for the date value.

    Text function in PowerApps

    Take a try to change the Date value as below (Assume you use TextInput here):

     

    Text(
     TextInput1.Text,
     DateTimeFormat.UTC)

    Besides, would it be convenient for you to close your another similar thread?

    https://powerusers.microsoft.com/t5/General-Flow-Discussion/Date-Formatting-in-Create-Event-V2/m-p/38111#M7509

     

    Regards,

    Michael

  • E-Mac Profile Picture
    60 on at
    Re: Converting a date from PowerApps using Compose

    Hi @v-micsh-msft

     

    I have collected some screen grabs that might help with the issue.

     

    startdate.PNGThis is where the date originates from in a datepicker from PowerApps.

     

    ComposeInput.PNGThis is how it is inputted into Compose in Flow.

    ComposeOutput.PNGThis is the output from Compose in flow, here you can see the day and month has been switched around even though its specified in the input.

     

    ErrorOutput.PNGThis is when the date is changed to 13/06/2017 in the datepicker from PowerApps. It seems to be picking up the 13 as a month.

     

    I hope this helps. Let me know if you need any more info. Thanks

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 691 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 431 Moderator

#3
developerAJ Profile Picture

developerAJ 266

Last 30 days Overall leaderboard