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 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    calculating time

    Hello there,

    I need help calcuating time using javascript. For example:

    start time= 9:00
    finish time= 18:00
    break=1:00

    Total hours worked=(finish time - start time) - break

    It's a bit complicated considering that one is working in minutes. Can anyone help? I'd really appreciate it.

  • #2
    Senior Coder
    Join Date
    Jul 2005
    Location
    New York, NY
    Posts
    1,084
    Thanks
    4
    Thanked 19 Times in 19 Posts
    The Date object is all you need.

    http://www.w3schools.com/jsref/jsref_obj_date.asp


  •  

    Posting Permissions

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