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 / Book a room template, ...
Power Apps
Answered

Book a room template, change from PM/AM to 24-hour

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi guys,

 

So, I have used the "Book a room" template and it seems to work, however, I dont know how to change "AdjustTimeScreen" from AM/PM to 24-hour format instead. How do I do this? I want the Start and **bleep** (End time) to be 01-24 instead of 1-12 pm/am

 

Thanks guys

 

hours123.PNG

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    Nobody? 😇
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

     

    Hi @ Antoooox:

    Do you want to make the Start and **bleep** (End time) to be 01-24 instead of 1-12 pm/am.

    I made a same test and found that the data source Times is a collection that created by OnStart property.

    So we can achieve the goal by modifying the formula that defines the Times collection.

    Here is my solution:

    Replace this code

     

    ClearCollect(Times, {Text: "12:00 am", Minutes: 0}, {Text: "12:30 am", Minutes: 30}, {Text: "1:00 am", Minutes: 60}, {Text: "1:30 am", Minutes: 90}, {Text: "2:00 am", Minutes: 120}, {Text: "2:30 am", Minutes: 150}, {Text: "3:00 am", Minutes: 180}, {Text: "3:30 am", Minutes: 210}, {Text: "4:00 am", Minutes: 240}, {Text: "4:30 am", Minutes: 270}, {Text: "5:00 am", Minutes: 300}, {Text: "5:30 am", Minutes: 330}, {Text: "6:00 am", Minutes: 360}, {Text: "6:30 am", Minutes: 390}, {Text: "7:00 am", Minutes: 420}, {Text: "7:30 am", Minutes: 450}, {Text: "8:00 am", Minutes: 480}, {Text: "8:30 am", Minutes: 510}, {Text: "9:00 am", Minutes: 540}, {Text: "9:30 am", Minutes: 570}, {Text: "10:00 am", Minutes: 600}, {Text: "10:30 am", Minutes: 630}, {Text: "11:00 am", Minutes: 660}, {Text: "11:30 am", Minutes: 690}, {Text: "12:00 pm", Minutes: 720}, {Text: "12:30 pm", Minutes: 750}, {Text: "13:00 pm", Minutes: 780}, {Text: "13:30 pm", Minutes: 810}, {Text: "14:00 pm", Minutes: 840}, {Text: "14:30 pm", Minutes: 870}, {Text: "15:00 pm", Minutes: 900}, {Text: "15:30 pm", Minutes: 930}, {Text: "16:00 pm", Minutes: 960}, {Text: "16:30 pm", Minutes: 990}, {Text: "17:00 pm", Minutes: 1020}, {Text: "17:30 pm", Minutes: 1050}, {Text: "18:00 pm", Minutes: 1080}, {Text: "18:30 pm", Minutes: 1110}, {Text: "19:00 pm", Minutes: 1140}, {Text: "19:30 pm", Minutes:1170}, {Text: "20:00 pm", Minutes: 1200}, {Text: "20:30 pm", Minutes: 1230}, {Text: "21:00 pm", Minutes: 1260}, {Text: "21:30 pm", Minutes: 1290}, {Text: "22:00 pm", Minutes: 1320}, {Text: "22:30 pm", Minutes: 1350}, {Text: "23:00 pm", Minutes: 1380}, {Text: "23:30 pm", Minutes: 1410})

     

    with

     

    ClearCollect(Times, {Text: "00:00", Minutes: 0}, {Text: "12:30", Minutes: 30}, {Text: "1:00", Minutes: 60}, {Text: "1:30", Minutes: 90}, {Text: "2:00", Minutes: 120}, {Text: "2:30", Minutes: 150}, {Text: "3:00", Minutes: 180}, {Text: "3:30", Minutes: 210}, {Text: "4:00", Minutes: 240}, {Text: "4:30", Minutes: 270}, {Text: "5:00", Minutes: 300}, {Text: "5:30", Minutes: 330}, {Text: "6:00", Minutes: 360}, {Text: "6:30", Minutes: 390}, {Text: "7:00", Minutes: 420}, {Text: "7:30", Minutes: 450}, {Text: "8:00", Minutes: 480}, {Text: "8:30", Minutes: 510}, {Text: "9:00", Minutes: 540}, {Text: "9:30", Minutes: 570}, {Text: "10:00", Minutes: 600}, {Text: "10:30", Minutes: 630}, {Text: "11:00", Minutes: 660}, {Text: "11:30", Minutes: 690}, {Text: "12:00", Minutes: 720}, {Text: "12:30", Minutes: 750}, {Text: "13:00", Minutes: 780}, {Text: "13:30", Minutes: 810}, {Text: "14:00", Minutes: 840}, {Text: "14:30", Minutes: 870}, {Text: "15:00", Minutes: 900}, {Text: "15:30", Minutes: 930}, {Text: "16:00", Minutes: 960}, {Text: "16:30", Minutes: 990}, {Text: "17:00", Minutes: 1020}, {Text: "17:30", Minutes: 1050}, {Text: "18:00", Minutes: 1080}, {Text: "18:30", Minutes: 1110}, {Text: "19:00", Minutes: 1140}, {Text: "19:30", Minutes:1170}, {Text: "20:00", Minutes: 1200}, {Text: "20:30", Minutes: 1230}, {Text: "21:00", Minutes: 1260}, {Text: "21:30", Minutes: 1290}, {Text: "22:00", Minutes: 1320}, {Text: "22:30", Minutes: 1350}, {Text: "23:00", Minutes: 1380}, {Text: "23:30", Minutes: 1410})

     

    qqq.jpg

     

     

    Best Regards,

    Bof

  • chtz01 Profile Picture
    8 on at

    When I replace this code I get an error and I do not have any option of choosing time. Has anyone tried this fix as of late? 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard