Results 1 to 2 of 2

Thread: Time Difference

  1. #1
    benj is offline Member
    Join Date
    Mar 2011
    Posts
    1
    Rep Power
    0

    Post Time Difference

    Good Day to all!!
    How can I compute time difference if my input in the "time in" for example is 8:15 and my "time out" is 17:00.
    How can i get the value in minutes and hours???
    I Hope you guys can help me.
    Thank you very much!:)

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,294
    Blog Entries
    7
    Rep Power
    24

    Default

    Quote Originally Posted by benj View Post
    Good Day to all!!
    How can I compute time difference if my input in the "time in" for example is 8:15 and my "time out" is 17:00.
    How can i get the value in minutes and hours???
    I Hope you guys can help me.
    Thank you very much!:)
    Use two Calendar objects, one for each time (and date); get the time stamp from both of them, subtract those two stamps and you have the difference in time measured in milli seconds.

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

Similar Threads

  1. Replies: 3
    Last Post: 08-23-2011, 12:46 PM
  2. what is the difference
    By ron87 in forum New To Java
    Replies: 5
    Last Post: 01-04-2011, 05:31 PM
  3. calculate time diff for particular time period
    By baktha.thalapathy in forum New To Java
    Replies: 2
    Last Post: 05-24-2010, 04:10 PM
  4. Class Time - represents time of day
    By verbazon in forum New To Java
    Replies: 1
    Last Post: 04-13-2009, 01:06 AM
  5. Difference between ASP and JSP
    By barney in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 08-07-2007, 07:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •