Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

storing times and dates

what is the best way to story "modifiable" times and dates



2:56 pm on Sep 7, 2005 (gmt 0)

10+ Year Member

Using php and mysql I'm keeping track of people's availability. Someone's availability can be set to July 6, 3pm to 5:30 pm for example. Of course it could change, so we allow them to change it.

The question is what is the best way to store the info? Should I use two timestamps, and use php to chop them into pieces to re-populate the form fields for modification? Use date/time fields? Use text fields? What is the easiest/most efficient/ and or most common?

Thanks for any input.


3:00 pm on Sep 7, 2005 (gmt 0)

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

I suppose you could do it with two date/time fields - a start date/time and an end date/time.

I've never liked the datetime type, so I might do it in two rows per person, with an extra field for "type" for "Start" or "End". Then each person would have a date field and a time field.

I'd have to ponder that one more. Actually, I need to ponder that more, since I might be doing a project that involves that very concept.


Featured Threads

Hot Threads This Week

Hot Threads This Month