Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Regular Coder
    Join Date
    Feb 2005
    Posts
    136
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Finding difference in time?

    Everyone on here has been a huge help and I am starting to actually learn a bit of javascript.

    What I am trying to do is basically just find how much time elapsed from start time to end time. I'll put some html code to what I need done. Hopefully it will explain it.


    Code:
    <form name="time1">
    Hours
    <select>
     <option>0
     <option>1
     .... through 12
    </select>
    
    Minutes
    <select>
     <option>0
     <option>1
     .... through 59
    </select>
    </form>
    
    <form name="time2">
    Hours
    <select>
     <option>0
     <option>1
     .... through 12
    </select>
    
    Minutes
    <select>
     <option>0
     <option>1
     .... through 59
    </select>
    </form>
    
    How many hours and minutes went by
    <input name="hours" value="how many hours" />
    <input name="minutes" value="how many minutes" />
    *****Or instead of select boxes, just separate input fields for the hour and the minutes .... <input hours /> <input minutes /> ****************

    So, if I selected 6:50 and then 7:30, I would want input "hours" to be populated with the value 0 and I would want input "minutes" to be populated with the value 40.

    This would be done as standard time, not military time, so AM and PM should not matter, right?

    Can this be done? Any examples or maybe even some guidance?

    Thanks again!
    B
    Last edited by bphein1980; 08-18-2005 at 04:08 PM. Reason: Additional info


 

Posting Permissions

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