I have an application that will have the user capture the creation date and an "expiration" date.
I want to show these records in a table -- sorted by this expiration date.
I have created the table and already have the records fill each row by jobID, however it would make more sense to have the records be viewed by this "expiration date"
Finally, I would also like to keep track of time spans within records. For instance. Being able to calculate (by number of days...and if needed hours) the amount of time that passed from the time the record was inputted into the system, until the time it was considered "completed" or "fulfilled" -- it doesnt matter if this date was prior to or after the "expiration" date.
Let's say the record was created on June 1, 2003, it has an expiration date of July 3, 2003, and the current date is June 19, 2003.
I would like to show that the record is currently 18 days old, or if "completed", that the record took 18 days to be "completed".
My questions are :
- What is the best way to collect this data (month, day, year) ?
- What datatype9s) should I be using? Should it be done from the mySQL side or the PHP side?
Is there a tutorial that covers this type of need specifically? Thanks.
I'm sure that there are a couple of solid ways to do this.