Can someone please help me with this. I mean most people do not know 24 hour clock. Especially kids. So I need a way to know when they select AM or PM. Please help.
So the AM PM that they can select on a 12 hour clock is just for looks? That is rather stupid. So what you are saying is on a 12 hour clock they select the am pm and then they have to select an am pm again. So what I am thinking that only the 24 hour time dialog is useful. Which really isn't very useful since not a lot of people know military time. Isn't this something they could update to fix?
I don't really understand your problem.
In the 12 hour Time dialog you get either a button or a wheel (depending on the Android version) which shows what you selected.
Clicking on the button switches between AM and PM.
Maybe I am missing something. Yes the user selects the hour, the minutes and either AM or PM. But how do I know whether they selected AM OR PM? There is the timedialog.hour and timedialog.minute but no timedialog.ampm.
I had a look at the Android documentation and the TimePicker has no getCurrentAMPM method.
You need to use
- the TimeTicks and this TimeFormat DateTime.TimeFormat = "HH:mm a".
- and DateTime.Time(dial.TimeTicks) returns a string with the two last characters either AM or PM.
Please disregard all of this. I am stupid. If the user selects 11 and then pm the hour comes through as 2300. I knew that. Just a giant brain fart. Matter of fact you might just delete this whole thread.
Please disregard all of this. I am stupid. If the user selects 11 and then pm the hour comes through as 2300. I knew that. Just a giant brain fart. Matter of fact you might just delete this whole thread.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.