[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] How can I add one month to change into the milliseconds?

I suggest: First, instead of your variables (fields?) year, month, day, hours and minutes just declare private LocalDate date; private LocalTime time; private long milliseconds; (Keep the milliseconds variable since you will want to have your result here.) In onDateSet assign a value to date in this way: date = LocalDate.of(selectedYear, selectedMonth + 1, selectedDate); … Read more