public static void main(String[] args)
{
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String s ="2010-09-28 14:10:00";
String e ="2010-09-28 15:11:00";
try
{
System.out.println("e = "+fmt.parse(e).getTime());
System.out.println("s = "+fmt.parse(s).getTime());
long ss = (fmt.parse(e).getTime()- fmt.parse(s).getTime())/(60*1000);
System.out.println("ss = "+ss);
DecimalFormat df1 = new DecimalFormat("0");
double hh =Math.floor(ss/60);
double mm =Math.floor(ss - hh*60);
System.out.println("hh:mm = "+df1.format(hh)+":"+df1.format(mm));
}
catch (ParseException e1)
{
e1.printStackTrace();
}
}