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 / Issue with Formatting ...
Power Automate
Answered

Issue with Formatting Date and Adding into Excel

(0) ShareShare
ReportReport
Posted on by 658
Hi,
 
I have a Power App which when a form is entered and the submit button is pressed, it starts a flow to pass the selected date in the form into Excel. For some reason, the date is not formatting as 'dd/mm/yyyy' as I would like. It appears in excel as 'mm/dd/yyyy'. I have tried using the parseDateTime expression to then format this in a compose action but it doesn't seem to work. I have found that when a date like 23/12/2024 is entered it will then give an error and say it's not in the ISO 8601 format, if a date like 09/12/2024 is entered it will usually work. Please see pictures below of my flow and the actions.
 
Any help would be greatly appreciated, thanks.
Categories:
I have the same question (0)
  • Srini007 Profile Picture
    3,467 Super User 2026 Season 1 on at
    Hi @BS10,
     
    The issue here is powerautomate expects ISO 8601 format which is 2024-12-23, In this case you are passing 23-12-2024 which causes the issue.
     
    Try to place a compose and write the expression as formatDateTime('DateString', yyyy-MM-dd)
     
    After that you can continue the steps
     
    Let us know if you are facing any issue
     
    If I have answered your question, please mark it as the Answered. If you like my response, please give it a Like.
     
    Regards,
    Srini
  • BS10 Profile Picture
    658 on at
     
    Thank you for your reply, I really appreciate it. I have added the expression below to the first compose action
     
    formatDateTime(triggerBody()?['text_3'],'yyyy-MM-dd')
     
    I then added another compose and set this expression to 
    formatDateTime(outputs('Compose'),'dd/MM/yyyy'
     
    This worked for a date when I entered 05/12/2024 which is correct but when I tried 20/11/2024 I got the same error as before, the value provided for date time string '20/11/2024' was not valid. The datetime string must match ISO 8601 format. 
     
    Thank you
  • Verified answer
    Srini007 Profile Picture
    3,467 Super User 2026 Season 1 on at
    Hi @BS10,
     
    Apologies for the error, you can try below expression
     
    formatDateTime(concat(split(triggerBody()?['text_3'], '/')[2], '-', split(triggerBody()?['text_3'], '/')[1], '-', split(triggerBody()?['text_3'], '/')[0]), 'yyyy-MM-dd')
     
    This way you can achieve the required output
     
    If I have answered your question, please mark it as the Answered. If you like my response, please give it a Like.
     
    Regards,
    Srini
     
     

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