Hi All
Is it possible in mysql to create a date field that stores year and month
only (-MM) without having to zero out the day or use varchar type fields
Thanks
Olaf
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
Is it possible in mysql to create a date field that stores year and month
only (-MM) without having to zero out the day or use varchar type fields
Best here is to just use a DATE field, then use DATE_FORMAT when you
want to pull up the customized date. It will get stored as a timestamp
Thanks...
My issue is not storage, it is confidentiality.
I am not allowed to store the day of birth as it is considered identifying
information (in medical records).
I do not even have the day, I want to pass a date in format (-MM) to a
date field if possible.
On 1/15/07 11:37 AM, Chris
Olaf Stein wrote:
Thanks...
My issue is not storage, it is confidentiality.
I am not allowed to store the day of birth as it is considered identifying
information (in medical records).
I do not even have the day, I want to pass a date in format (-MM) to a
date field if possible.
Pass the
Assign all dates to have a day of 01
Store in a date field, use DATE_FORMAT to just extract the MM and .
As you don't have the real day information it doesn't matter what day is used,
so long as it present in all months.
Hope this helps
Robert Gehrig
Webmaster at www.gdbarri.com
e-mail: