Joined: 21 Aug 2009
Online Status: Offline
Posts: 68
Topic: Selecting range of an event based on date Posted: 21 Aug 2009 at 12:39pm
I am writing a report that is meant to display how many hours in a particular date range a machine is running. Each time the machine is turned on it creates a new event in the db with a start time field and end time field. These times are in seconds in epoch form from 1/1/1990. I have discovered in formula writer that I can convert these times to datetime with the DateAdd function.
My next step is to figure out a way to calculate only the part of the event that falls within the date parameter. For example, if the parameter is runtime between 1/1 0700 hrs and 1/2 0700 hrs and there is a run event from 0600 hrs on 1/2 to 1200 hrs on 1/2 I would only want it to count 1 hour of run time on my report. Any ideas on how this could be done? Any help would be greatly appreciated!!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum