Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I´ve trying this for several days, but I´m a newbie yet. I would like to split my data in work days.
For example. I´ll have:
Início do período (Start date) - 7/11/2013 11:10:00 am
Fim do período (End date) - 7/15/2013 10:20:00 am
I would like to have the interval of time excluding non working hours and sunday
7/11/2013 - consider only 11:10am to 6pm +
7/12/2013 - consider only 9am to 6pm
7/13/2013 - consider only 9am to 6pm
7/14/2013 whole 24hrs should be excluded
7/15/2013 consider only 2am to 10:20am
I tried this solution Splitting the data - On the way to granularity, but this is splitting in time zones. I could not make this in work days. I´ll need to transform this interval above ( 7/15/2013 10:20:00 am, 7/11/2013 11:10:00 am) in several days considering work hours)
Any help would be appreciated.
Regards
Fernando
Sorry I didn´t myselft clear. But yes, I would like to split the the interval (Start date:28/04/2014 15:31:00, End Date: 30/04/2014 08:43:00)
in work / days hours
lState | ShiftID | TZStart | TZEnd |
24 | 1 | 28/04/2014 15:31 | 28/04/2014 18:00 |
24 | 2 | 28/04/2014 09:00 | 29/04/2014 18:00 |
24 | 3 | 29/04/2014 09:00 | 29/04/2014 08:43 |
See if this is close enough to what you need.
In the script, I added field Date:
LEFT JOIN (RESULT) LOAD DISTINCT
lState,
date(floor(TZStart)) as Date
RESIDENT RESULT;
The rest of the logic is in the expressions on the front end.
Yes. I really appreciated.
I noticed that you based your solution (which really help me) on "TZDates" (TZStart & TZEnd). Is it possible do to the same based on tStart and tEnd?
Best Regards,
Fernando
Hmm, my chart expressions are using tStart and tEnd... I used TZ only in the script for the sake of simplicity.
Tks anyway!