Java : how to add 10 mins in my Time

前端 未结 8 1901
闹比i
闹比i 2020-11-27 21:00

I am getting this time

String myTime = \"14:10\";

Now I want to add like 10 mins to this time, so that it would be 14:20

8条回答
  •  醉酒成梦
    2020-11-27 21:09

    I would recommend storing the time as integers and regulate it through the division and modulo operators, once that is done convert the integers into the string format you require.

提交回复
热议问题