I recently found out that there are two ways to store dates in a database:
1) You can convert the date now and store it in a date field and then pull that out when you need it
2) You can store the integer produced by the time() function in an integer field and then pull it out when you need it and then format it using the date() function
Are both methods the same? is one better in some way? is one of the methods faster than the other?
I always use Epoch time() since it's always easier for me to process it. I don't see of much a difference though, both to store date, but if you do much stuff with PHP, I think use time() will be more helpful.
And I don't see what the "date" type in MySQL could do anything special?! :)
The only benefit to the date field in MySQl is there are built in functions in MySQL that you can use right in your query to calculate dates and format them right in the sql statement
Oh yeah, and DATE in MySQL is human-readable while time() return a string of 9 numbers! Just curious when will it jump to 10 numbers :) it's 97xxxxxxx something now!