On 6/29/05, me you wrote: > > For the most part, the data entered is correct and uses the full YYYY-MM-DD > format, however, I've got numerous dates that are incomplete. For example: > an event happened in 1967, but the exact month and day are not known. I've > been storing that data, in other forms, as 1967-00-00 but now dropping it > into MySQL, when extracting that information using PHP, I'm running into > errors where a date like '1967-00-00' would be deemd as having occured in > 1966? > > As far as the data goes, here's some sample dates that I need to be able to > handle. > > AS ENTERED EQUIVILANT LONG FORM > ----------------------------------------------------------------------- > 1965-08-12 August 12, 1965 > 1965-08-00 August 1965 > 1965-00-00 1965
I prefer to store fuzzy dates as both a date and an interval (precision). You can also use a start and an end date instead of a start and an interval. So in the case of your three examples I would store: 1965-08-12 0 August 12, 1965 1965-08-00 1 month August 1965 1965-00-00 1 year 1965 Advantage of doing this is that you can also store dates with a precision of 'second half of 1913'. Jochem -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]