0
How to make time converter
How to covert AM into PM in JAVA
3 Antworten
0
[edit: If you are, about code coach problem,]
What you have tried so far..?
Pls first Try and share your code...
Hint:
Not am to pm, it's about 0 to 24 hour farmat instead of 12hr so 1PM means 13:00 hours..
0
or
with time string
check position of colon with st.indexOf()
parse hours Integer.parseInt( st.substring() )
hours+12 +st.substring() //rest of string
0
or
with LocalTIme or Calendar type of time
use String.format() with "%tT" as parameter
or printf() for direct output