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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Timesheet

(0) ShareShare
ReportReport
Posted on by 407

Hi, working on a timesheet app. I have a start and finish time dropdown and a AM/PM drop down box. I have a hidden label that i want to show army time of what the user selected. On the text properties of the hidden lablel, i can put in the below and it works fine.

If(MonFinish.Selected.Value="12:15"&MonAMPM.Selected.Value,"AM","1215")

But i need to be able to convert all times selected. If i put in the hidden label text properties, see below, i get an error. I have tried Or and && but only shows true and false in the label instead of the time e.g. 1215

If(MonFinish.Selected.Value="12:15"&MonAMPM.Selected.Value,"AM","1215");

If(MonFinish.Selected.Value="12:30"&MonAMPM.Selected.Value,"AM","1230")

Can you please assist

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,541 Most Valuable Professional on at

    Hi @Matt383 ,

    It can be done with a bit of complexity if I knew your AM/PM rules and the conversion result.

  • Matt383 Profile Picture
    407 on at

    Hi Warren, yes i did try both && and Or but both result in the label saying false. It works fine if i only have one line. e.g. Substitute( MonStart.Selected.Value, "12:15", "1215") 

     

    Matt383_0-1634613884711.png

     

  • WarrenBelz Profile Picture
    153,541 Most Valuable Professional on at

    Hi @Matt383 ,

    Firstly you need && instead of &, but there may be an easier way depending on what your rules for AM/PM are  - the below will get the format

    Substitute(
     MonFinish.Selected.Value,
     ":",
     ""
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 422

#2
WarrenBelz Profile Picture

WarrenBelz 380 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 325 Super User 2025 Season 2

Last 30 days Overall leaderboard