vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| > Is it possible in mysql to create a date field that stores year and month > only (YYYY-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 (integer), so you really won't notice that much of a storage difference. |
| |||
| 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 (YYYY-MM) to a date field if possible. On 1/15/07 11:37 AM, "Chris White" <chriswhite@interfuel.com> wrote: > >> Is it possible in mysql to create a date field that stores year and month >> only (YYYY-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 > (integer), so you really won't notice that much of a storage difference. ------------------------- Olaf Stein DBA Center for Quantitative and Computational Biology Columbus Children's Research Institute 700 Children's Drive phone: 1-614-355-5685 cell: 1-614-843-0432 email: steino@ccri.net |
| ||||
| 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 (YYYY-MM) to a > date field if possible. > Pass the date in format (YYYY-MM-00). -- Gerald L. Clark Supplier Systems Corporation |