notsoevilgenius
MIS
Hello!
My on again, off again database project is on again with new bosses. Now they would like to track time worked. I have a table with date, time in and time out. I need to calculate the hours:minutes worked and show them in the table:
The calculation line is blank so I need to figure the correct syntax for that.
The next step will be to add up all the rows and calculate the amount of time worked year to date.
Thanks for your help in advanced.
My on again, off again database project is on again with new bosses. Now they would like to track time worked. I have a table with date, time in and time out. I need to calculate the hours:minutes worked and show them in the table:
Code:
<tr>
<td><?php echo date('m/d/Y', strtotime($row['date']))?></td>
<td><?php echo date('g:i A', strtotime($row['t_in']))?></td>
<td><?php echo date('g:i A', strtotime($row['t_out']))?></td>
<td><?php $t_total = $t_out - $t_in ; echo ($row['t_total'])?></td>
</tr>
The calculation line is blank so I need to figure the correct syntax for that.
The next step will be to add up all the rows and calculate the amount of time worked year to date.
Thanks for your help in advanced.