cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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

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

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

 

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Nobody? 😇
v-bofeng-msft
Community Support
Community Support

 

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

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? 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (5,809)