// try yyyy-mm-dd for valueOf
if (StringUtil.containsOnlyDigits(stringValue) == false) {
try {
return Timestamp.valueOf(stringValue);
} catch (IllegalArgumentException iaex) {
throw new TypeConversionException(value, iaex);
}
}
// assume string to be a number
try {
long milliseconds = Long.parseLong(stringValue);
return new Timestamp(milliseconds);
} catch (NumberFormatException nfex) {
throw new TypeConversionException(value, nfex);
}
}