Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Formatting UTC date within a concat function

(0) ShareShare
ReportReport
Posted on by

Hello,
I currently use two functions the first one to get the modified date and then format it, is pretty straight forward. The second one, not so much.

Function #1: convertFromUtc(outputs('Get_file_properties')?['body/modified'],'Eastern Standard Time','MM/dd/yyyy hh:mm tt')

Function #2: concat('ApproverName: ',item()?['responder']?['displayName'],variables('strBreakline'),'ResponseDate: ',item()?['responseDate'],variables('strBreakline'),'Comment: ',item()?['comments'],variables('strAllResponses'))

The output of Function #2 is: 

Chrislond58_0-1623352314816.png

 

Notice the ResponseDate isnt formatted as will happen in Function #1.
How can I use convertFromUTC in Function #2?



  • Re: Formatting UTC date within a concat function

    <null>

  • Re: Formatting UTC date within a concat function

    So I created a separate compose to handle the response date.

    formatDateTime(outputs('Start_and_wait_for_an_approval_2')?['responseDate'],'MM/dd/yyyy hh:mm:ss')

    I am not sure how to include the Compose output to the second expression.
    concat('ApproverName: ',item()?['responder']?['displayName'],variables('strBreakline'),'ResponseDate: ',item()?['outputs('Compose_Format_Date1')'],variables('strBreakline'),'Comment: ',item()?['comments'],variables('strAllResponses'))

    Thanks for your help.
  • ScottShearer Profile Picture
    ScottShearer 25,150 on at
    Re: Formatting UTC date within a concat function

    @Anonymous 

    You could simply embed the formatDateTime() expression in Function#2, but for clarity, I suggest using a Compose action.  In the compose action, simply use the formatDateTime() expression to format your date.  Then replace the reference to the date in Function #2 with a reference to the output of the Compose action.

     

     

     

     

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,691

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 65,019

Leaderboard