9 Replies Latest reply: Jan 3, 2013 8:09 AM by Gerhard Laubscher RSS

    Time between Two timestamps

    Gerhard Laubscher

      Hi There,

       

      I'm having problems with time format.

       

      In my load script I have:

      Timestamp(Timestamp#( [Log Date], 'DD-MMM-YYYY hh:mm:ss')) as [Log Date & Time],

      Timestamp(Timestamp#( [Decision Date], 'DD-MMM-YYYY hh:mm:ss')) as [Decision Date & Time],

       

      In an expression (not in the load script) I then want to calculate my avergae "Process Time", which is the average time difference the two.

       

      I get the wrong values whenever the time taken is more than 24 hours.

       

      For instance, if log date is 2012/12/30 3:10:00 PM and Decision Date is 2012/12/31 4:15:00 PM, I get an answer of 1:05:00, when it should be 25:05:00

       

      I know I should use interval but cannot get the format of the expression right.

       

      Please help,

       

      Gerhard