Skip to main content

Notifications

Community site session details

Community site session details

Session Id : MjZO+Ijhc/xQQydLbUgdSi
Power Automate - General Discussion
Unanswered

Formatting UTC date within a concat function

Like (0) ShareShare
ReportReport
Posted on 10 Jun 2021 19:11:11 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?



  • Community Power Platform Member Profile Picture
    on 11 Jun 2021 at 13:39:36
    Re: Formatting UTC date within a concat function

    <null>

  • Community Power Platform Member Profile Picture
    on 10 Jun 2021 at 20:47:34
    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
    25,150 Most Valuable Professional on 10 Jun 2021 at 19:40:14
    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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

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

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,508 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,369 Most Valuable Professional

Leaderboard
Loading complete