I have a textfield where two dates are stored, separated by "-" .
10.11.2022-15.11.2022
I select the first part as date
SELECT
ART.ID,
CAST(RIGHT(ART.FIELD1, POSITION('-' IN ART.FIELD1) - 1) AS DATE)
FROM
PRODUCTS ART
Problem is if the textfield does not contain the right format, I get an error.
1h32i2o-15.11.2022
So, I need a function in the WHERE clause which validates if the first part contains data that can be cast as DATE.