Home } Math Related } Date Difference



Enter two dates (including the time!) and this script will display the number of weeks, days, hours, minutes, and seconds between the two. The seconds field is optional, too. For an example, try entering your birthdate and compare it to today's date.
First Date:   Date:   (MM/DD/YYYY format)
              Time:   (HH:MM:SS format)

Second Date:  Date:   (MM/DD/YYYY format)
              Time:   (HH:MM:SS format)

Date Difference:

The JavaScript Source: Math Related: Date Difference

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!

    

Did you use this script?  Do you like this site?  Please link to us!

Add a comment, suggestion, or correction
[For questions about usage, consult the Notes tab above or visit the JavaScript forum. Do not include more than two (2) lines of code in your comments. If you have suggestions or corrections, you can submit them to us.]

    
   
       
[optional]
 
[optional]

   

Comments feed Comment Feed RSS 2.0

1. From: Ejaz Ahmed
Data diff
11/26/2008 04:27:20

It works fine

thanks
ejaz

Sign up for the Web Development Daily Newsletter

internet.com Privacy Policy
We'll send this script to you!

(just click "Send it!" once!)