elizabethb Posted February 20, 2004 Posted February 20, 2004 Hello, I am stuck! I need to calculate attendance by half hour increments. The scenario is that within a 24 hour period, folks can have a shift starting and ending at any time. How would one count attendance for that 24 hour period by half hour increments? Any help would be greatly appreciated. Elizabeth
jscooper Posted February 20, 2004 Posted February 20, 2004 I'm not sure what exactly you're after, but this calculation: Round(time1/1800,0) * (1800) should give you a time field rounded to the nearest half-hour. (Internally, FM stores time as an integer, so 1800 seconds every half hour) Jeff
elizabethb Posted February 23, 2004 Author Posted February 23, 2004 Jeff, Thanks. I have the time field part straight. My problem is that I need to be able to calculate how many people are in attendance at any given time. There is a maximum of say, 5 people, allowed at once. So, if someone was there 8-4, someone else 9-5, someone else 9-6, etc. I would need to be able to calculate when the cap of 5 people fluctuates to allow for a new person to come. It's hard to put into words, so forgive me if I'm not being clear. Thanks for any help you might be able to give! Elizabeth
CyborgSam Posted February 24, 2004 Posted February 24, 2004 Sounds like you need to use the Count function. Let's assume you have a calculation named c.InAttendanceNow, which determines if a person is currently in attendance. It'll have some way of knowing that a person arrived but has not yet left. Make another calculation field with Count(c.InAttendanceNow), this is the number of people currently in attendance.
Recommended Posts
This topic is 7922 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now