5 Replies Latest reply: Jan 18, 2013 8:16 AM by shreevat RSS

    Calculation issues with date and time - Urgent

    rb4777
      Hi,
      I have to calculate the time difference between two dates with time stamps.

      startTime = 17-01-2013 09:13:45 ;

      endTime = 17-01-2013 09:13:46 ;

      long finalTime = ( startTime - endTime) / 1000;

      Above finalTime is not giving accurate time in seconds. it differs by 1 sec. For the above it should be 1 sec difference but giving valuse as zero. How to get the accurate time ? pl suggest.

      I need finalTime in seconds.

      Thanks,