homepage Welcome to WebmasterWorld Guest from 54.196.195.158
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

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




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

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.

 

txbakers




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved