Storing day and month (without year)
Posted
by
Sasha
on Stack Overflow
See other posts from Stack Overflow
or by Sasha
Published on 2011-02-14T23:18:28Z
Indexed on
2011/02/14
23:25 UTC
Read the original article
Hit count: 244
mysql
|database-design
I'm having trouble with figuring out the best way to store some data in my database. I've got to store DD/MM dates in a database, but I'm not sure of the best way to store this so that it can be easily sorted and searched.
Basically a user will be able to save important dates in the format DD/MM, which they will be reminded of closer to the day.
The DATE data type doesn't seem completely appropriate as it includes year, but I can't think of another way of storing this data. It would be possible to include a specific year to the end of all occasions, but this almost doesn't seem right.
© Stack Overflow or respective owner