export-to-csvpowerbi-desktopemail-attachmentspower-automate-desktop

How to format date in Powerautomate when Email to .CSV


Im looking for Powerbi/Powerautomate help. I have created a flow to export a table in Powerbi by email in .csv format.

But the date is always in UTC= "2024-01-22T14:14:34.000Z". Here is my flow, can someone tell me how I could format to short date "MM-DD-YYYY". What action, where to insert...etc?

enter image description here

enter image description here enter image description here

Thanks in advance

Tried inserting Compose action, adding formatdate, but outcome did not work.


Solution

  • You can use a formatDateTime([ASSIGNED_DATE], 'MM-dd-yyyy') function inside your 'Append to array variable' action.

    Replace the PowerBI variable 'ASSIGNED DATE' with an expression to allow you to use the formatDateTime() function and insert the 'ASSIGNED DATE' PowerBI variable as the first parameter of the function.

    Microsoft have some really useful documentation for date time values and how to add the expression to the flow here.