cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
KevinHardy
Level 8

Text time format

Hi All,

I am using 2 dropdowns for Hours and Minutes and then combining them in a DataCard. All works fine EXCEPT it display in AM/PM rather than 24hr, which is what I'd prefer. Been looking for ages, but can't seem to find out why. Any Ideas?

Default of DataCard: Time(Value(StartHourDropdown_1.Selected.Value), Value(StartMinutesDropdown_1.Selected.Value), 0)

Screenshot 2019-12-12 at 15.59.55.pngScreenshot

I'm assuming I've got myself into a mess with Text/Number combinations. But it's late in the day and my brain is tired 🙂

Kev

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Text time format

@KevinHardy 

Hello again my friend.  Hopefully I can be of some service to you here.

Putting this code in your label would result in 7AM displaying as 07:00 and 7PM displaying as 19:00.

 

Text(
    Time(
        Value(StartHourDropdown_1.Selected.Value),
        Value(StartMinutesDropdown_1.Selected.Value),
        0
    ),
    "hh:mm"
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Text time format

@KevinHardy 

Hello again my friend.  Hopefully I can be of some service to you here.

Putting this code in your label would result in 7AM displaying as 07:00 and 7PM displaying as 19:00.

 

Text(
    Time(
        Value(StartHourDropdown_1.Selected.Value),
        Value(StartMinutesDropdown_1.Selected.Value),
        0
    ),
    "hh:mm"
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

KevinHardy
Level 8

Re: Text time format

Thank you @mdevaney ,

I understand why but I would never have got there without you 🙂

Kev

 

p.s. 2 finished apps now 🙂

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (6,026)