Gettting a valid date from the given string according to the format '%M %d,%Y':

Valid date
2009-05-18