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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Date Conversion in Pow...
Power Automate
Unanswered

Date Conversion in Power Automate

(0) ShareShare
ReportReport
Posted on by 18

Hi

 

I have looked through a number of posts on this and tried a lot of what I found but cannot find what I am looking for. 

 

I have created a form and the date in the form shows as dd-mm-yyyy but when I put the response into a power automate flow it changes the format to yyyy-mm-dd and any changes I make fail as I get a message saying it must be ISO8601 compliant. 

 

Does anyone out there know how I can format the date so it is displayed as dd-mm-yyyy

 

Any help would be really appreciated.

Categories:
I have the same question (0)
  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    Hey @Metamorph 

     

    You can use the expression - 

     

    formatDateTime(triggerBody()?['Date'],'dd/MM/yyyy')

     

    CFernandes_0-1634131786108.png

     

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Metamorph Profile Picture
    18 on at

    Hi @CFernandes 

    Thanks for the quick reply. I am new to doing this, but I cannot see the full expression and would this step be after get response details?

     

    Thank you

     

  • Metamorph Profile Picture
    18 on at

    Sorry got string in an email. I have tried that and I got

     

    Unable to process template language expressions in action 'Compose' inputs at line '1' and column '15952': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.

  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    @Metamorph It seems that the value returned by your variable is null.

     

    Can you add a compose > add the variable and see if it returns correct value?

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Metamorph Profile Picture
    18 on at

    I tried that and I got the following

    Metamorph_0-1634134531361.png

     

  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    Hey Mate @Metamorph 

     

    Your date Time item is not set.

     

    Please Fill in the form again make sure your Date Time field is filled and then run your flow and you will see the existing value.

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

  • Metamorph Profile Picture
    18 on at

    Hi

    I completed the form again and filled in every field on it but the flow has still failed with the same error. ☹️

  • v-LilyW-msft Profile Picture
    on at

    Hi @Metamorph 

    Please take a try refer to the screenshot below.

    vLilyWmsft_0-1634176273172.png

    Expression:formatDateTime(outputs('Compose'),'dd-MM-yyyy')

    vLilyWmsft_1-1634176286967.png

    Result:

    vLilyWmsft_2-1634176371835.png

    Hope the content above may help you.

    Best Regards

    If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Metamorph Profile Picture
    18 on at

    Hi

     

    I tried that and got: 

     

    Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The 'inputs' property of template action 'Compose' at line '1' and column '18122' is not valid. The action cannot reference itself.'.'.
    Metamorph_0-1634197535254.png

     

  • Verified answer
    v-LilyW-msft Profile Picture
    on at

    Hi @Metamorph 

    Please note that in the picture below, there are two Composes and write the formula in Compose 2.

    vLilyWmsft_0-1634197749852.png

    Best Regards.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard