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 Apps / Get only hour from a s...
Power Apps
Answered

Get only hour from a split function?

(0) ShareShare
ReportReport
Posted on by 997

Hello,

I'm trying to get only the hour if the date is today

If not show date and time

But i don't get anywhere??

Last(
 FirstN(
 Split(
 ThisItem.Result,
 ";"
 ),
 1
 )
).Result
& " by " & Last(
 FirstN(
 Split(
 ThisItem.Result,
 ";"
 ),
 2
 ).Result
).Result

The data looks like:

12-07-2022 19:27:22;John Doe;test@test.com;
16-06-2022 05:17:52;John Doe;test@test.com;

So i like to get the result like:

19:27:22

 

Thank you

Categories:
  • Verified answer
    SagarVIS96 Profile Picture
    212 on at

    Hi @TimmyBoy ,

    You can use following code:

    Last(Split(First(Split("12-07-2022 19:27:22;John Doe;test@test.com;",";")).Result," ")).Result

     

    It will give you output like this: 19:27:22

     

    Thanks

     

  • TimmyBoy Profile Picture
    997 on at

    Hello @SagarVIS96 

    Awesome, what about if the date isn't today?

    How to check that and then show it completely.

    Thank you

     

    I used your first code like this
    Last(Split(First(Split(ThisItem.Result,";")).Result," ")).Result
    
    Thank you.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard