hiii,
Im wanting to calculate the time difference between $out2 and $in2 and out put it into a spreadsheet:
$m=0;
while ($m < $num9) {
$fullname=mysql_result($result9,$m,"username");
$date=mysql_result($result9,$m,"date");
$in1=mysql_result($result9,$m,"in1");
$out1=mysql_result($result9,$m,"out1");
$in2=mysql_result($result9,$m,"in2");
$out2=mysql_result($result9,$m,"out2");
$out2f=date("G:i:s",strtotime($out2));
$in2f=date("G:i:s",strtotime($in2));
echo date("D",strtotime($date)). "\t" . $fullname . "\t" . $in1 . "\t". $out1 . "\t" . $in2 . "\t" . $out2 . "\t" . date("G:i:s",strtotime($out2f-$in2f)) . "\t" . "\n";
$m++;
}
header("Content-disposition: attachment; filename=spreadsheet.xls");
why does this code return 00:00:00 ?