Solved

Determining time difference between two lines.

Posted on 2011-09-20
1
310 Views
Last Modified: 2012-06-21
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
Comment
Question by:Slainiae
1 Comment
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 36567942
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question