0

I have a task to change format 12 hours time to 24 hours time. What is the method i have to use? for example: time like 10.30 AM, 09.12 AM, 09.00 AM How can I Change to format 24 hours time in java ?

Ipal
  • 135
  • 1
  • 10
  • 1
    Basically by applying a different format. What have you tried so far? Can you show us any code attempt? – deHaar Feb 21 '22 at 07:47
  • I think you ae looking for this https://stackoverflow.com/questions/6531632/conversion-from-12-hours-time-to-24-hours-time-in-java – Jorne Schuurmans Feb 21 '22 at 07:49
  • https://stackoverflow.com/questions/69566133/how-to-change-time-format-in-java-am-pm-vs-am-pm – JCompetence Feb 21 '22 at 07:49
  • Also check out [link](https://beginnersbook.com/2014/01/how-to-convert-12-hour-time-to-24-hour-date-in-java/) – Nishikant Tayade Feb 21 '22 at 07:50
  • 1
    What type is holding the information in your code? Do you already use a specialzed class like `java.time.LocalTime` for it or do you have `String`s formatted as `"hh:mm a"`? – deHaar Feb 21 '22 at 07:59

0 Answers0