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:
| Items | Dates |
| Item_A | 12/05/2023 |
| Item_B | 05/03/2023 |
| Item_C | 24/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:
| Header | Value |
| Item | item()?['Items'] |
| Dates | replace(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?