1) Why use IFNULL, if you put NULL as first expression? It means it will always return the second expression.2) The error is not caused by IFNULL, but by STR_TO_DATE. It seems the value of myDate is NULL.

PhilipToop
—
2011-02-11T10:48:38Z —
#3

The documentation says

IFNULL(expr1,expr2)
If expr1 is not NULL, IFNULL() returns expr1; otherwise it returns expr2.