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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.