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 / Wrong Date Format In CSV
Power Automate
Unanswered

Wrong Date Format In CSV

(0) ShareShare
ReportReport
Posted on by 65

I'm getting the wrong date format whenever I export a CSV through a flow.

I have a SharePoint List with two columns (Single Text | Date Only) just like below:

 

ItemsDates
Item_A12/05/2023
Item_B05/03/2023
Item_C24/07/2023

 

I've created a flow to export these two columns whenever there is a new entry or one of the items is modified.

The thing is I will use this CSV to upload it to one of our systems and it only accepts files with dates as mentioned below:

 

Items, Dates
Item_A,12052023
Item_B,05032023
Item_C,24072023

See that Item_A row, 'Dates' were 12/05/2023 and the objective is to get 12052023. The same goes to the other rows.

 

Using the "Create CSV Table" action, I tried something like:

HeaderValue
Itemitem()?['Items']
Datesreplace(string(item()?['Items']),'/','')

 

And then the "Create File" to export the CSV table.

But, instead of getting the desired date format, I get dates with "-" and reversed as seen below:

 

Item,Dates
Item_A,2023-05-12
Item_B,2023-03-05
Item_C,2023-07-24

 

Can someone please help me through a way of formatting the dates correctly?

Categories:
I have the same question (0)
  • NickMerrick Profile Picture
    419 Super User 2024 Season 1 on at

    YYYY-MM-DD is the correct international business date format, but if you really need it, are the dates in the upload spreadsheet formatted as dates or as a string? If its formatted as a date that explains why its converting to an acceptable date format. If you need it to be read month day year all in one string, make sure the item() is being read as a string, replace the slashes then save it as an integer. That will force excel to see the value as 12052023 instead of May 12th 2023.

  • Verified answer
    trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at

    Hi @Calheiro ,

     

    Looks like this will do it for you - if this works, please mark as a solution so others can find it quickly!  Here, I am selecting my columns using the custom column option and then using the expression helper and feeding it the current format and the desired format, creating file and looks good.  Does this work for you?  Always glad to help!  Tom

     

    dateformatting22.pngdateformatting21.pngdateformatting23.png

  • Calheiro Profile Picture
    65 on at

    It worked exactly as you described! Thank you so much.

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