How to take one field time and add 3 minutes in another?

-1

I would like to know how to get the time from the txt_hora field and go to txt_hora2 by adding +3 minutes. In case in field one would be 9:50 and switch to the other 9:53.

Here I enter the Time

Andafterclicking"GO" it falls on this screen

Accordingtotheimage,Ineedtotransferthefirsthourtotheotherfields,butcounting+3minutes.Itriedtodothis,butIcouldnot:

txt_hora2.setText("" + (Integer.parseInt(txt_hora.getText()) + 3));

and this too:

txt_hora2.setText("" + (Integer.parseInt(txt_hora.getText()) + (1000 * 60 * 3)));
    
asked by anonymous 02.10.2017 / 15:00

1 answer

1

Since you have not submitted a Minimum, Full and Verifiable example , I will assume that this field is always guaranteed to receive hours formatted and within the valid range of each unit of time to be considered valid (eg hours

03.10.2017 / 15:28