I have field a VARCHAR fielddob in mysql table where dates are saved in two format :
1> y-m-d
2> d/m/y
Now I want to select candidates whose dob <= '01/01/1979' (born on or before 01 January, 1979)
but i am unable to understand how to compare these two time formats at once.
is there any way to handle this like either convert one format into another format and then compare.
where coalesce(date(dob), str_to_date(dob, '%d/%m/%Y')) <= '1979-01-01'