Peter van Oord van der Vlies wrote:
Ok that will do the trick, now i have 1 other problem. I found in that
table also other values.
I need to be sure that i only select the values that contains this
format. Is that possible ?
You can use regular expressions to match only the NN-NN-NNNN formats:
WHERE date_col REGEXP '[0-9]{2}-[0-9]{2}-[0-9]{4}'
But it's not clear if these are guaranteed to be DD-MM-YYYY. They could
be MM-DD-YYYY, and if so, there are cases where the format cannot be
determined (e.g. '02-02-2001').
At this point, it starts to sound like you should do this in application
code, and find some application library that does more sophisticated
date parsing.
I'm not sure what application language you're using, but when I use
Perl, I use the Date::Manip module, which has a very flexible
date-parsing function.
Regards,
Bill K.