long time = dateA.getTime() dateB.getTime();
// 一分未満の端数を求めて、分に変換
long sec = ((time  % ( 1000 * 60 * 60 * 60)) / 1000)  % 60;
// 一時間未満の端数を求めて、分に変換
long min = ((time  % ( 1000 * 60 * 60)) / 1000 / 60) % 60;
// 何時間かを求める
long hour = ( time / ( 1000 * 60 * 60));
String strTime = hour + "h" + min + "m" /* +sec + "s" */;

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

© 2024 Falco Tech Blog Suffusion theme by Sayontan Sinha