Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Friends if i ma having to coloumns checked in and checked out.
Example:
Checked out | ||
---|---|---|
2/12/2013 8.30 | 2/12/2013 11.55 | |
2/12/2013 12.46 | 2/12/2013 17.55 | |
3/12/2013 8.30 | 3/12/2013 11.30 | |
3/12/2013 11.45 | 3/12/2013 19.00 |
Now from thses coloumns i want total hours spent for that particular project.
first coloumn present is the project name and then checked in and checked out time .
are you looking for the differences between 2 dates in hours? do you need to count only business days? How many hours a day? Please, would you add the expected result for each row?
You can use
(Timestamp#([Checked out],'DD/MM/YYYY hh.mm') - Timestamp#([Checked in],'DD/MM/YYYY hh.mm'), 'hh') AS SpentTime
Actually the columns are like as follows:
Project Name Checked in Checked Out
A 2/12/2013 8.30 2/12/2013 11.55
A 2/12/2013 12.46 2/12/2013 17.55
B 3/12/2013 8.30 3/12/2013 11.30
C 3/12/2013 11.45 3/12/2013 19.00
Now i want to find out total hours spent for each project.
Like now for A toal 8.64 hours spent
Use interval(), like:
Interval(date1-date2, 'hh') as HourDiff
This function works on your dataset... but if your the difference betwwen In and Out is more than 1 day, your team will works 24/7
//the team works 24h/7d
Interval(date#(Out,'D/MM/YYYY h.mm')- date#(In,'D/MM/YYYY h.mm'),'h') as Delta,
//the team works 8h 7d/w.
Interval((date#(Out,'D/MM/YYYY h.mm')- date#(In,'D/MM/YYYY h.mm'))/3,'h') as DeltaWorkHours
hi
check this
Regards,
Ravi N.
Hi vijay,
time(Timestamp#(Outtime,'DD/MM/YYYY hh.mm') - Timestamp#(Intime,'DD/MM/YYYY hh.mm'), 'hh.mm') AS difference
and group by project name
Hi Vijay,
Try like this in script
LOAD
*
Interval([Checked Out]-[Checked in], 'hh') as HourDiff
FROM DataSource;
Now in Chart use
Dimension : Project Name
Expression : Sum(HourDiff)
Hope this helps you.
Regards,
Jagan.