[Solved] Time in milliseconds calculation

Here some tipps to get started: You can parse the String to a Java Date like this: SimpleDateFormat format = new SimpleDateFormat(“HH:mm:ss”); Date startTimer1Date = format.parse(StartTimer1); You can get the current Date and Time like this: Date dateNow = new Date(); And since you are working with time only (and not with date and time), … Read more

[Solved] Android : how can I add 5 Times in a variable and get total seconds of them

A easy way to do it, if the format is the one you have pointed, without have to worry in convert the Date is the following: int totalSum = getSecondsFromDate(“05:12:02”) + getSecondsFromDate(“19:12:52”) + getSecondsFromDate(“40:12:14”) + getSecondsFromDate(“56:54:10”) + getSecondsFromDate(“41:12:12”); private int getSecondsFromDate(String date){ //We split the date to have hours, minutes and seconds String splitDate = … Read more