Store incomplete date in MySQL date field

Viewed 10288

I want to offer the user the possibility to introduce dates that are incomplete (for example just the year 2005, or Jan 1998) but also complete dates with year, month, day. Can I accomplish this using a single date field in the DB?

I have tried UPDATE tableA SET mydate = '2001-00-00' and it seems to work (no errors) but I'm not sure if this is correct. Internally I assume a timestamp is used so how can MySQL represent those 0's?

3 Answers
Related