Skip to Content
0
Former Member
Feb 03, 2010 at 06:06 PM

Count function within date/time

251 Views

Using Crystal Reports X, I need to calculate how many people are in a building at any given hour over rolling 24 hour periods. Each person entering is recorded by dd/mm/yyyy hh:mm:ss and the same method is used when they leave thus each person has a time span in the building. I know the date/time of leaving is critical to this in terms of whether it's populated or is null but I'm getting caught on the calculation in between. The two date/time fields should allow their presence in the building to be recorded and counted each hour. The critical point will come at midnight where the DateDiff function will need to apply. Does anyone have a solution that doesn't involve multiple formulae or stored procedures?