Java : how to add 10 mins in my Time

前端 未结 8 1904
闹比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:22

    You need to have it converted to a Date, where you can then add a number of seconds, and convert it back to a string.

提交回复
热议问题