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

How to calculate when system is down between datestamp

Hi,
i want to calculate when duration is zero based on the datestamp and would like to group it by Date and Hour.  Pls. see attached sample for the desired results.  thanks
sample.xlsx
0
karinos57
Asked:
karinos57
  • 3
  • 3
1 Solution
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello,

add a column to your data with a formula like

=IF(C2=0,MINUTE(A1-A2),0)

copy down. Now you can build a pivot table with the date stamp in the row headers, grouped by day and hour.

See attached, on Sheet2

cheers, teylyn


sample--2-.xlsx
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Or, for better precision, use this as the formula:

=IF(C2=0,1440*(A1-A2),0)

cheers,
0
 
karinos57Author Commented:
teylyn:
this is working great but one quesiton for you, where did you get the Days field in the pivot?  i don't see it in the data source.  I only see DateStamp.  thanks
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
karinos57Author Commented:
i like the way you formatted like the DateStamp by just showing hours and grouped by a day  but it is not clear.  Can you post antother sheet where i can see all the formatting or if you can explain - i will appreciate that. thanks
0
 
karinos57Author Commented:
thnx
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello,

I used Excel 2010 to create the pivot table. Right-click on any date in the pivot table and select Group - then tick the day and hour.

After that, I used the buttons on the pivot table layout tab to play with the appearance of the table. Some of these options are new to 2010,  but I don't think I used any of the new ones.

cheers, teylyn
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

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