An alternative solution will be in the form of a date mask (for example, in IP). Save the date in a regular date and time field and insert an additional field of type smallint or something else where you can indicate what is present (maybe even binary):
If you have YYYY-MM-DD , you will have 3 bits of data, which will have a value of 1 if data is present, and 0 if not.
Example:
Date Mask 2009-12-05 7 (111) 2009-12-01 6 (110, only year and month are know, and day is set to default 1) 2009-01-20 5 (101, for some strange reason, only the year and the date is known. January has 31 days, so it will never generate an error)
Which decision is best depends on what you will do with it.
This is better if you want to select those that have full dates that are between a certain period (less for recording). Also in this way it is easier to compare any dates that have masks like 7,6,4. It can also take up less memory (date + smallint can be less than int + int + int, and only if datetime uses 64 bits and smallint uses as much as int, it will be the same).
source share