After many years of trial and error, I find using the MySQL column types
DATE
TIME and
DATETIME to be most useful
For selection, MySQL is full of useful date functions that work with its internal datatypes
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
SELECT FROM myTable WHERE YEAR(myDate) ='2007'
SELECT FROM myTable WHERE YEARWEEK(myDate)='200703' #3rd week of year
SELECT FROM myTable WHERE WEEKDAY(myDate)=1 #mondays
SELECT FROM myTable WHERE QUARTER(myDate)=2
Etc. So easy, no conversion,
You can populate any of these with a current date/time like this
SET myColumn=NOW()
Also remember the TIMESTAMP datatype that will automatically beset to NOW() at the time the record is saved, unless explicitly set otherwise. If you have a table with a column myTimestamp set as TIMESTAMP datatype:
INSERT INTO myTable SET id=1
#myTimestamp will automatically be set to NOW()
UPDATE myTable SET resaved=resaved+1 WHERE id=1
#myTimestamp will automatically be set to NOW()
To keep myTimestamp from automatically updated on last save, explicitly state:
UPDATE myTable
SET resaved=resaved+1,
myTimestamp=myTimestamp #Maintain creation timestamp
WHERE id=1