Jump to content

Time Tracker Application Suggestions


Zergman

Recommended Posts

The application I need to build is basically a time tracker.  The users will use this to log times throughout the work day where they are not doing their normal scheduled work.

 

This is what i've come up with so far.

 

1) table is setup with a StartTime, EndTime, Notes, date, Username columns.

- Both time colums are set to TIME in mysql for format ... not sure if this is the right way to go

- Notes is set to LONGTEXT since im not sure how much info they will put in

2) Insert form is using drop menus for entering the start and end time. 

Im sure this isn't the best solution

 

Points im not sure on is;

- how the users will enter the times ... need it to be quick and easy

- how to store the times in the database and what column format is best

- easiest way to allow the users to search and display the times for a given day

Link to comment
Share on other sites

- how the users will enter the times ... need it to be quick and easy

Hrmmm.  You could have some kind of Javascript clock.  Or, they could have an input box, and you could just use strtotime, assuming the people using the page aren't too dumb to enter an understandable date.

 

- how to store the times in the database and what column format is best

I would probably go with unix timestamps (number of seconds since Jan 1, 1970 00:00 GMT).

 

- easiest way to allow the users to search and display the times for a given day

If you went with a unix timestamp, you could simply do something like:

SELECT * FROM time_tracked WHERE StartTime >= $day AND EndTime < $day2

 

That would be where $day is the day you're searching for at 00:00, and $day2 would be $day + 24*60*60.

 

 

DATETIME columns might actually be better, but I'll let you google and decide.

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.