Catch exception when parsing date.