In fact, it looks like DB2 for AS / 400 might not have a function ISDATE()(I cannot find anything in the V6R1 link - or, interestingly, the LUW link). So your problem is that the function does not exist.
The root of the problem, of course, is that trying to translate an invalid date causes the operator to stop. In light of this, this statement should give you a date if formatting is possible, and null if it is not. Please note that if you mixed US / EUR formats / orders, you may not recover the data correctly (if your separators are different and I think they are the default, you will probably be all right).
WITH date_format(strDate, format) as (
SELECT strDate,
CASE
WHEN strDate LIKE('____-__-__') THEN 'ISO'
WHEN strDate LIKE('__.__.____') THEN 'EUR'
WHEN strDate LIKE('__/__/____') THEN 'USA'
ELSE NULL END
FROM dataTable
)
SELECT
strDate,
format,
CASE
WHEN format IS NOT NULL THEN DATE(strDate)
ELSE NULL
END AS realDate
FROM date_format
This causes the dataTable to look like this:
String Dates
=============
2011-09-22
22.09.2011
09/22/2011
a111x90x00 -- And who knows what this is...
In it:
Results:
strDate format realDate
2011-09-22 ISO 2011-09-22
22.09.2011 EUR 2011-09-22
09/22/2011 USA 2011-09-22
a111x90x00 - -
This example, of course, uses the default formats, which are automatically translated. If you have something else, you will have to manually translate it (instead of returning the format, you can fine-tune it to ISO and then quit).