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.  ...
  • v-achippa's avatar
    v-achippa
    8 months ago

    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