Long Nd = 1000 * 24 * 60 * 60 ; Long NH * 60 * 60 = 1000 ; Long nm = 60 * 1000 ; Long NS = 1000 ; for (PhcUserbed phcUserbed: phcUserbedList) {// Get the database list eleven calculated responseDto PhcUserbedResponseDto = new new PhcUserbedResponseDto (); // parameter passing objects defined Long TIME1 = (phcUserbed.getEndTime () the getTime () phcUserbed.getStartTime () the getTime ()..); // Get two times from the database and compute their difference String time = (TIME1 / Nd) + "day" + (time1% nd / nh ) + " when" + (time1% nd% nh / nm) + " min" + (time1% nd% nh % nm / ns) + "s" ; responseDto.setUsedata (String.valueOf (Time)); /// assigned }
result