View previous topic :: View next topic
|
Author |
Message |
jaspal
New User
Joined: 22 May 2007 Posts: 68 Location: mumbai
|
|
|
|
I have to find difference between two times that are in HHMMSS
TIMEA-TIMEB
TIMEA WE WILL GET FROM FILE1 WHICH IS SAME ALL THE TIME SAY 11:36:24
TIMEB WE WILL GET FROM THE OTHER FILE IN WHICH ALL THE TIMES ARE DIFFERENT SAY
09:00:00
09:10:00
10:00:00
10:12:34
SO WE REQUIRE TO SUBTRACT TIMEB FROM TIMEA
AS LIKE THIS
Code: |
TIMEA - TIMEB = TIMEC
11:36:24 - 09:00:00 = 02:36:24
- 09:10:00 = 02:26:24
- 10:00:10 = 01:36:14
- 10:12:34 = 01:23:50 |
WE HAVE TO MOVE TIMEC TO ARRAY SO THAT IT CAN BE MOVED TO TABLE |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Convert the time hh.mm.ss to seconds only. Perform the calculation and convert back to hh.mm.ss. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Or use base60 math....... |
|
Back to top |
|
|
Suryanarayana.tadala
New User
Joined: 03 Nov 2005 Posts: 43 Location: St.Louis
|
|
|
|
I think any one of the above is fine.. if you checking for time differance in the same region (i mean time zone) |
|
Back to top |
|
|
|