1 Reply Latest reply on Apr 10, 2012 4:38 PM by George_Johnson

    How do I get the difference of time and/or date using JavaScript?

    ee_pcb

      Hi All,

       

      I have four user text entry values (Date and Time) which require a difference to be performed on them.  The results would be put into a fifth text box named "Burn_Time". The entries are

      Start_Date, Start_Time, Stop_Date, and Stop_Time.

       

      How do I calculate the elapsed time between the entries?  For ease of calculations I surmised putting the values in 24 hour format would be helpful (not sure if this is true or not).

       

      Here is an example:

      Start_Date = 2012-04-10

      Start_Time = 10:00

      Stop_Date = 2012-04-12

      Stop_Time = 10:00

      Burn_Time = 48 (hours).

       

      Any help would be greatly appreciated!