How to add 30 minutes to java.sql.Time object? -
i have time
object:
time mytime = java.sql.time.valueof("15:33:00");
how can add 30 minutes mytime
in java? means new time 16:03:00
java.sql.time mytime = java.sql.time.valueof("15:33:00"); localtime localtime = mytime.tolocaltime(); localtime = localtime.plusminutes(30); string output = localtime.tostring();
you can localtime straight away java.sql.time , can use plusminutes in localtime api add 30 minutes. might check this
Comments
Post a Comment