web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Time column from Postg...
Power Automate
Answered

Time column from Postgresql formatting

(0) ShareShare
ReportReport
Posted on by 32

I have a table with a column with the "time" datatype.

Byt when i fetch data from it, it gets this weird formatting.

07:03:22 becomes PT7H3M22S.

 

Any way of getting Power Automate to do this like normal people?

Categories:
I have the same question (0)
  • Verified answer
    v-zhoqian-msft Profile Picture
    Microsoft Employee on at

    Hi @shakudu ,

     

    The direct method is to extract numbers through the split function:

    vzhoqianmsft_0-1681722931569.png

    first(split(outputs('Compose'),'H'))
    first(split(last(split(outputs('Compose'),'H')),'M'))
    first(split(last(split(last(split(outputs('Compose'),'H')),'M')),'S'))
    formatDateTime(outputs('Compose_2'),'HH:mm:ss')
     
    vzhoqianmsft_1-1681723016090.png

     

     

     

    Best Regards,

    Habsburg Qian

    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • shakudu Profile Picture
    32 on at

    Thank you, i was hoping that there was a database-related solution to this but it seems Postgres is anything but straightforward in Power Automate.

    I unfortunately had to make it with conditions forhours, minutes and seconds because is minutes was 00 in the database it would show up as 7H23S, messing up the split. But thank you for helping me find the way, i accepted your suggestion as the solution.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 248 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 204

#3
Haque Profile Picture

Haque 179

Last 30 days Overall leaderboard