• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 321
  • Last Modified:

Determining time difference between two lines.

Hi.
I have a very large file which shows when a site looses power and when that site powers-up again.
Each site has two lines - the first line shows when the site looses power and the second line shows when the site powers up again. Column D contains the timestamp when these events occur.
Can you tell me please what the code is which will show, in seconds, the outage time in column E. (Note: bear in mind that the outage may extend over a number of days therefore it's important to note the date part of the timestamp too)
Many thanks.


A              B              C                                     D
3713      Site A      15/09/2011 02:19:27      Event 1 at 2011-09-15 02:19:27.0 : Power down
3713      Site A      15/09/2011 02:19:42      Event 2 at 2011-09-15 02:19:42.0 : Power up
5397      Site B      15/09/2011 02:35:32      Event 1 at 2011-09-15 02:35:32.0 : Power down
5397      Site B      15/09/2011 02:36:12      Event 2 at 2011-09-15 02:36:12.0 : Power up

0
Slainiae
Asked:
Slainiae
1 Solution
 
barry houdiniCommented:
Column C looks like it has the time/date in a viable format - you can simple subtract and convert to get seconds, e.g. in E2

=(C2-C1)*86400

format E2 as number with no decimal places

To copy down leave e1 blank, select e1 and E2 and drag/fill down column

regards, barry
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now