Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

How to break out Date, Hour, Minutes, and AM-PM

(0) ShareShare
ReportReport
Posted on by 278

I have a need to break out a date into multiple values.

 

I have a datacard with a date and time in it.

I want to take the text that is in this datacard, and pull out values for date, hour, minutes, and AM/PM

 

At first I thought that since this is just text, I can create a label, and convert the text to an actual date/time.

Travis5150_0-1642263302703.png

 

I have not found a way to pull out values for date, the hour, the minutes, and whether it is AM or PM.

is this possible?

I thought about doing 4 more labels and putting the values there, but i dont know how to break it up, or if it is even possible.

  • Verified answer
    Travis5150 Profile Picture
    278 on at
    Re: How to break out Date, Hour, Minutes, and AM-PM

    I figured this out, using these two links:

    https://www.matthewdevaney.com/all-power-apps-date-time-functions-with-examples/

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-left-mid-right

     

    I created a label to make the text into a date value

    DateTimeValue(DataCardValue5.Text)

    Then created a label for the hour and minutes and pulled the values out

    Hour(DateTimeConvertfromText)

    Minute(DateTimeConvertfromText)

    for the AM/PM, I used the Right function

    Right(DateTimeConvertfromText, 2)

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1