[Solved] How can I convert a datetime string into an integer datatype?
A first step will be to convert the time in HH:MM:SS format (which is how your string is formatted) to that of seconds as per the following: String timerStop1 = String.format(“%02d”, hours) + “:” + String.format(“%02d”, minutes) + “:” + String.format(“%02d”, seconds); String[] timef=timerStop1.split(“:”); int hour=Integer.parseInt(timef[0]); int minute=Integer.parseInt(timef[1]); int second=Integer.parseInt(timef[2]); int temp; temp = second … Read more