Jump to content

Date Problem


seanD

Recommended Posts

Hi, I'm pretty new to php, and I've been getting by on google searches and several books for references. But I seem to be stuck on this one problem.

 

I imported this data from a csv file which tracks times employees clock in and out of work. I was able to import the csv into mysql using php. The csv contains one row per transaction. Each time you clock in or out, it creates a new row. See the following:

employee1, 5445 ,07:10:49,04/20/2010

employee1, OUT, 15:40:37,04/20/2010

employee1, 5445, 07:20:12,04/21/2010

employee1, OUT, 15:58:04,04/23/2010

 

The second column indicates whether a person clocked in or out. The third is the time, the last is the date.

 

I've been able to display the data in a table, but I would like to subtract the time from each different row to display the hours worked.

 

I don't usually post on forums in fear of getting flamed. So forgive me if I broke any rules.

 

Appreciate any help I can get.

Link to comment
https://forums.phpfreaks.com/topic/206250-date-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.