I needed to convert only the hour part of 12 hour time string to 24 hour format. I’m not interested in other than hour parts of a date string. SimpleDateFormatter is notoriously buggy and I in fact I’m more interested in the conversion algorithm itself. So what I want is to find the algorithm to convert the hour part. This
Tag: timeofday
Time difference in AM/PM in Java
I am trying to calculate the time difference in java by input time format in 12 hours it works well when i input start time 11:58:10 pm and end time 12:02:15 am. But as i enter 12:00:00 am and 12:00:00 pm it give difference 0 minutes. don’t know why. Below is my code please let me know where i am