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 / Excel date not display...
Power Automate
Answered

Excel date not displaying the same as output of add a row to table

(0) ShareShare
ReportReport
Posted on by 38

Hi, I'm having troubles with writing this to excel.

 

Currently, extract this from a PDF. I include the "Date:" as there is no space therefore power automate picks it up as one

BenConway_0-1691442631945.png

 

(dd-MM-yyyy)

 

I take the text output from the AI model and using this expression get just the date:

slice(outputs('Extract_information_from_documents')?['body/responsev2/predictionOutput/labels/Trade_00b8095d61d243f4b6293739258a33c7bd/text'], sub(indexOf(outputs('Extract_information_from_documents')?['body/responsev2/predictionOutput/labels/Trade_00b8095d61d243f4b6293739258a33c7bd/text'], '/'), 2), lastIndexOf(outputs('Extract_information_from_documents')?['body/responsev2/predictionOutput/labels/Trade_00b8095d61d243f4b6293739258a33c7bd/text'], ' '))

 

From here I get the correct output of 09/06/2022 (dd-MM-yyyy). I can see this in the Add row to table outputs when the flow runs.

 

However, when I open the excel file the date comes out as 06/09/2022. (MM-dd-yyyy)

 

I've checked excel is formatting the cells as they should i.e. UK formatting 

 

I've tried adding in formatDateTime({above expression}), 'yyyy-MM-dd') but I then get an error with other dates going through saying: "Unable to process template language expressions in action 'Add_a_row_into_a_table_4' inputs at line '0' and column '0': 'In function 'formatDateTime', the value provided for date time string '18/04/2023' was not valid. The datetime string must match ISO 8601 format.'."

 

How would you suggest going about this?

 

Thank you ahead!

Categories:
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @BenConway ,

     

    Please change the date and time format to 'yyyy/MM/dd'.

    Sample:

    vxiaochenmsft_0-1691461115404.png

    formatDateTime(parseDateTime(outputs('Compose'),'en-Us','dd/MM/yyyy'),'yyyy/MM/dd')

    vxiaochenmsft_1-1691461155524.png

     

    Best Regards,

    Wearsky

  • BenConway Profile Picture
    38 on at

    .

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 288 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard