3 Replies Latest reply: Feb 9, 2016 9:46 AM by Christian Howard RSS

    (Availability) Calendar based on two dates



      I'm trying to calculate availability for some servers and I'm trying to figure out how to do this based on two dates and duration of the event. This is how my table looks like:

      As you can see there is one server (ID 9) that's been down for little more than two months. I want to "split" this value so I can show duration for each month. For this server I would like to able to visualize it like this:


      2015-07: xxxx seconds (first_date - 2015-07-31 23:59:59)

      2015-08: xxxx seconds (2015-08-01 00:00:00 - 2015-08-31 23:59:59)

      2015-09: xxxx seconds (2015-09-01 00:00:00 - end_date)