Your last example results in
validDate being
false. First 2 examples are valid dates, but 2010-04-18 is not. So maybe it's time you have a look on the api of SimpleDateFormat, because you clearly don't have a correct understanding of how it works! It is not a strict parsing like when you would use a Pattern for example. So "dd" doesn't require 2 digits (indicating day), the "/" must be present (that's why the example where different fields are seperated with "," and "-" fails).
I didn't do any date validations and stored the date just as a
String, because you can only update the customer id, all other values are immutable in this assignment, so why bother to try parsing this date. You could use a combination of a Pattern (
\d\d\d\d/\d\d/\d\d) and the SimpleDateFormat.