Skip to main content

Notifications

Power Automate - Using Connectors
Answered

How to format a Date and Time value to use it in a 'Create CSV table' with custom columns?

(0) ShareShare
ReportReport
Posted on by

How is formatting a Date and Time value in a 'Create CSV table' data operation done? 

 

I need to format date time field from the 'Get items' in order to use it in the 'Create CSV table' with custom columns. 

 

When I try to do a Compose - data operations  action or Convert time zone action to format the date time field it puts it in an 'apply to each' but the output from the Compose or Convert time zone doesn't become available to use in the 'Create CSV table' with custom columns.

  • Ry009_ Profile Picture
    Ry009_ 109 on at
    Re: How to format a Date and Time value to use it in a 'Create CSV table' with custom columns?

    I've tried 

    formatDateTime(item()?['TableName[FieldName]'],'dd-MM-yyyy')

    But can't get it working, any ideas?
  • Verified answer
    Re: How to format a Date and Time value to use it in a 'Create CSV table' with custom columns?

     

    Thanks for the clue, this is the format I ended up needing to use:

     

    convertTimeZone(item()?['DateTime'], 'UTC','Pacific Standard Time','MM/dd/yyyy HH:mm')

     

  • Verified answer
    v-yamao-msft Profile Picture
    v-yamao-msft on at
    Re: How to format a Date and Time value to use it in a 'Create CSV table' with custom columns?

    Hi @Anonymous,

     

    Please just try to enter the function in the formula bar under Expression tab.

    Please check the following flow configuration for a reference.

    The code used to format the date column is:

    formatDateTime(item()?['Date'],'yyyy-MM-dd')

    1.PNG

    Please feel free post back if you need more help.

     

    Best regards,

    Mabel

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard

Featured topics