Forum Discussion

gmasta1129's avatar
gmasta1129
Resolver I
9 months ago
Solved

Power Automate Flow_DateTime Format for CSV file

Hello,

 

On Power Automate, I am creating a flow where the user clicks a button and the report gets sent to an SFTP folder in CSV format.  

 

Two of the columns in my report contains date data.  When the user views the Power BI table on the Power BI website, the date format is shown as mm/dd/yyyy.  

 

When I create the flow, the csv output in the SFTP folder changes the date format for those two columns to...

2027-10-26T04:00:00.000Z

 

How would I fix the date format for these two columns to mm/dd/yyyy? Do i fix this at the "Create CSV table" step? 

 

Please see screenshot below for flow

 

 

Please see screenshot for more details on the "Create CSV table" step 

 

  • Hi gmasta1129,

     

    As we haven’t heard back from you, we wanted to kindly follow up to check if you have raised this in the related forum?

    If not please take a look on below trouble shooting steps:

     

    Here you are seeing this format because power automate shows datetime fields in ISO format when creating a CSV. To keep the date columns in mm/dd/yyyy, you need to convert those fields to text before the CSV is generated. Please follow below steps:

    • Add a Select option i.e (Data Operations --> Select) before creating CSV table.
    • In the Select mapping, pass all your columns as it is, but for the date fields use this below format:
      formatDateTime(item()?['DateColumnName'], 'MM/dd/yyyy')
    • Use the output of the Select step as the input to create CSV table.

    This ensures the CSV receives formatted text values, so the output will show the dates correctly.

     

    Thanks and regards,

    Anjan Kumar Chippa

3 Replies

  • v-achippa's avatar
    v-achippa
    Community Support

    Hi gmasta1129,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    Thank you for your question. This issue is related to Power Automate flow design. Since the Fabric Community focuses on Power BI and Fabric topics, so to get accurate guidance I recommend posting this question in the official Power Automate Community Forum, where the product experts can help you step-by-step.

    Microsoft Power Platform Community Forum Thread

     

    Thanks and regards,

    Anjan Kumar Chippa

    • v-achippa's avatar
      v-achippa
      Community Support

      Hi gmasta1129,

       

      As we haven’t heard back from you, we wanted to kindly follow up to check if you have raised this in the related forum?

      If not please take a look on below trouble shooting steps:

       

      Here you are seeing this format because power automate shows datetime fields in ISO format when creating a CSV. To keep the date columns in mm/dd/yyyy, you need to convert those fields to text before the CSV is generated. Please follow below steps:

      • Add a Select option i.e (Data Operations --> Select) before creating CSV table.
      • In the Select mapping, pass all your columns as it is, but for the date fields use this below format:
        formatDateTime(item()?['DateColumnName'], 'MM/dd/yyyy')
      • Use the output of the Select step as the input to create CSV table.

      This ensures the CSV receives formatted text values, so the output will show the dates correctly.

       

      Thanks and regards,

      Anjan Kumar Chippa

      • v-achippa's avatar
        v-achippa
        Community Support

        Hi gmasta1129,

         

        As we haven’t heard back from you, we wanted to kindly follow up to check if the solution I have provided for the issue worked? or have you raised this in the related forum?

         

        Thanks and regards,

        Anjan Kumar Chippa