Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi, sorry for my bad english, i have a big big problem !!
i have
i need to make a class hour for count minutes logged
usually for class 1 time i use
but with range 2 times i dont know !!???
how can i do ?
there are some exaples with class two datetimes ?
thanks
I'd calculate this in the script with something like this:
Data: LOAD *, If(Hour<login, Interval(Hour+1/24-login,'m'),if(Hour+1/24< logout,1/24,logout-Hour)) as [Minutes logged]; LOAD *, Time(Floor(login + (IterNo()-1)/24, 1/24),'hh:mm') as Hour While Floor(login + (IterNo()-1)/24,1/24) < logout; LOAD operator, Time#(login,'hh:mm') as login, Time#(logout,'hh:mm') as logout INLINE [ operator, login, logout Alex, 09:50, 11:30 Simon, 09:00, 10:30 Luca, 11:01, 12:00 ];
Data:
LOAD *, If(Hour<login, Interval(Hour+1/24-login,'m'),if(Hour+1/24< logout,1/24,logout-Hour)) as [Minutes logged];
LOAD *, Time(Floor(login + (IterNo()-1)/24, 1/24),'hh:mm') as Hour
While Floor(login + (IterNo()-1)/24,1/24) < logout;
LOAD
operator,
Time#(login,'hh:mm') as login,
Time#(logout,'hh:mm') as logout
INLINE [
operator, login, logout
Alex, 09:50, 11:30
Simon, 09:00, 10:30
Luca, 11:01, 12:00
];
The inline load is just an example. You can replace that with a load statement that load the data from your real source table.