Changing from 24 to 12 hour time (TimePicker)

When the time is past 1:00 PM in the app that I'm building, the TimePicker only seems to use 24 hour time. I've tried using previous forum posts to figure out what I'm doing wrong, but to no avail. Any help would be appreciated. Thanks!

I apologize in advance if there's an 'obvious' mistake - I'm kinda new to coding.

You need to format. This discussion might help; it needs to be adapted to your code.

specifically format its times with procedure AMPM

So would I need to format TimePicker1.Hour then?

Perhaps modify your code to use timePicker12hour edited

17 in 24 hour time format is 5 pm in 12 hour format. You can adapt the example code to provide AM and PM flags depending on how you want to use the information in your app.

or use the complex method described by Abraham.

actually it is 4pm... :partying_face:
Taifun

:cry: oh no, I misspoke. Tnx Taifun.

It worked! Thank you so much.

Note that in my case, I didn't need to use a global variable (global goals was an unrelated part of my code).

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.