<%@page import= "java.io.*, java.util.*, java.text.* " %>
<%
Date frDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2007-05-01 15:37:01");
Date toDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse("2007-05-01 16:27:01");
long diffMil = toDate.getTime() - frDate.getTime();
long diffSec = diffMil/1000;
long diffHour = diffSec/3600;
long Min = (diffSec%3600) / 60;
out.println ("diffMil==>" + diffMil + "<br>");
out.println ("diffSec==>" + diffSec + "<br>");
out.println ("diffHour==>" + diffHour + "<br>");
out.println ("Min==>" + Min + "<br>");
String ret = diffHour + ":" + Min + " 남았습니다";
out.println ("ret==>" + ret + "<br>");
%>
~