I have some data that describes workers login and logout times.
I'm calculating sum of minutes per workshift (which is 8 hours) when workers are logged in.
For example shift starts at 08:00AM and ends 02:00PM. Time is now 11:30 and login logout data i have so far is:
Where m is login time and n is logout time.
Ok, sum of this is sum of differences of each logout-login time and we get:
115+95+150 = 360 minutes.
How to represent this summation with summation notation?
Notation should be working in general since we don't have any matrix data exists for example future login logout times.
Yes, thank you. r is unknown in real situation. We don't know how many login-logout events will exist. We know only that we have to sum all login-logout where login and logout are between shift starttime and current time.
This might needs some additional conditions like:
So, summing this all together. What would the summation look like?
Representing m and n with decimals like 08,15 10,10 and refactoring summation notation to summing function f(m,n) which calculates:
(60*integerpartof(n)+decimalpartof(n)) - (integerpartof(m)+decimalpartof(m)) we finally get the right notation?
Yes this one works only if there is no different years, months or days between m and n.