I want to calculate the difference in minutes of two time stamp variables(endTime_check
and endtime
) .. first variable endTime_check
is declared as String
and Second variable endtime
is taken from database type is DateTime
.
code is :
DateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");
String endTime_check = "";
endTime_check = timeFormat.format(cal.getTime());
//endtime is taken from database, type is DateTime
endtime = rs.getString("endtime");