Use the below format for the date to avoid this error.
yyyy-mm-dd
Example:
String a = ‘2013-02-14’;
Date d = Date.valueOf(s); // It won’t show invalid date error.