View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 06:36 AM
Chris White
 
Posts: n/a
Default Re: Date format question


> 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.
Reply With Quote