Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to produce a graph that shows when people entered and exited a hospital. I have a TimeStamp for both the entry and exit (EventStartTime and EventEndTime). I want to group the events into 15 minute time intervals. In the script I have achieved this by using:
Time( class( EventEndTime, .25/24))AS End15Interval,
Time( class( EventStartTime, .25/24))AS Start15Interval
These fields do appear to give me what I need. I have then created a line graph with the dimension of DataEventID (each DataEvent has an EventStartTime and an EventEndTime). I then have used the expression:
=COUNT(Start15Interval)
The graph comes out like this:
I was however expecting it to come out with all the values showing just the times and not considering the dates. Similarly I'm surprised that when I create a listbox for Start15Intervals I see lots of the same values appearing.
It feels as though the Start15Interval appears to be just a time value but might actually also include a date stamp which the graph must be picking up.
Any suggestion on how I can resolve this?
Thanks for your help it is greatly appreciated.
Dan
Hi
You have not removed the date component of the data. Time() only reformats it to look like a time, but the underlying value is still a time/date value. Use Frac() to remove the date portion, for example:
Time(class(Frac(EventEndTime), .25/24)) AS End15Interval
HTH
Jonathan