on 02-27-2007 7:12 PM
<p><span>WorkedHours column type is varchar(8) (for HH:MM:SS), <br />how to sum working hours of an employee for every month.</span> <br /></p><p><span>ex. of data : WorkedHours<br /><br />attencode attendate WorkedHours<br />1573 20-01-2007 07:34:22<br />1573 21-01-2007 12:31:10<br /><br />how can i sum the WorkedHours and print it in Hours format.<br />(like 20.17 for this 2 values)<br /><br />Can u able to follow me.<br />If not pls. feel free to get more information in this regard.</span></p>
Create a formula like this :
((hour({tmpDate.attendate }) * 60 * 60) +
(minute({tmpDate.attendate }) * 60) +
Second({tmpDate.attendate }))/3600
and then take the Sum of it. You can get the result.
logic behind this is all the hours and minutes are converted into seconds and then added and divided by 3600 to get the actual hours.
thanks
kanak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<p>datediff("h",#20-01-2007 07:34:22#,#21-01-2007 12:31:10#)</p><p>Rahul</p>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.