+ Reply to Thread
Results 1 to 8 of 8

Calculating Hours of Downtime Every Month

  1. #1
    Registered User
    Join Date
    03-17-2019
    Location
    Tokyo
    MS-Off Ver
    2016
    Posts
    5

    Calculating Hours of Downtime Every Month

    Hi,
    When a service downtime started and ended on the same month I have no problem getting the number of hours as I could just get the difference between the dates. However, I am having trouble calculating the number of hours a service went down if it ended in a different month.

    For Example:
    Started Ended
    Feb X, 2019 hh:mm AM March X, 2019 hh:mm AM

    I want to know how many hours the service was down during the month of February excluding the hours from March and vice versa.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Calculating Hours of Downtime Every Month

    Welcome to the forum!

    You should be able to get time differences between any dates. Attach a sample workbook that shows the problem here.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Calculating Hours of Downtime Every Month

    Try this formula to get total downtime per month

    Please Login or Register  to view this content.
    the max around the whole formula is to supress negative outcomes as they can happen.
    also it only works for downtimes less then one calandermonth, so if a downtimes starts in feb and ends in april the formula can be inaccurate

    On top of the formula I also used the duration time format which also suppresses 0 values
    (because in long tables many 0:00:00 strings can make it hard to read/find actual downtimes)

    in the attachment you can see the formula in action
    Attached Files Attached Files

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Calculating Hours of Downtime Every Month

    Try this formula
    Date in A2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    You can format the result as
    dd "(days)", hh "hours", mm "minutes and " :ss,0 " seconds"

  5. #5
    Registered User
    Join Date
    03-17-2019
    Location
    Tokyo
    MS-Off Ver
    2016
    Posts
    5

    Re: Calculating Hours of Downtime Every Month

    Thank you so much for this Roel Jongman

    Do you have an idea how to calculate it if it goes over more than one calendar month? Pardon for asking much
    Last edited by Thienzaw; 03-17-2019 at 07:11 PM.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Calculating Hours of Downtime Every Month

    See if this modification of Roel's formula, as modeled in the attached file, will work for your purposes (where the dates span more than two months).
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    03-17-2019
    Location
    Tokyo
    MS-Off Ver
    2016
    Posts
    5

    Re: Calculating Hours of Downtime Every Month

    Thank you really appreciate the help

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Calculating Hours of Downtime Every Month

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Calculating student time within certain amount of hours/month.
    By thursday140 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-12-2019, 05:51 AM
  2. [SOLVED] Calculating Downtime During Hours of Operation
    By Puni in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-01-2018, 11:00 PM
  3. Convert server downtime to Uptime in Hours for whole month
    By AsuraSinX in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-29-2016, 09:07 PM
  4. Calculating No of Hours within a Month from Pivot
    By aftabn10 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-11-2015, 09:18 AM
  5. Need help calculating Downtime
    By Ben.Cgg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2013, 05:02 PM
  6. Need help in calculating downtime
    By Nitinkumar in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-06-2013, 09:58 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1