我正在传递一个像“2012-02-20'T'01:01:01”这样的字符串
/**
* Parse a workflowDate.
* @param workflowDate an instance of a workflowDate string.
* @return the date object containing parsed workflow date.
*/
private Date parseDate(final String workflowDate)
{
DateFormat df = new SimpleDateFormat("YYYY-MM-DD'T'hh:mm:ss", Locale.ENGLISH);
Date retVal = null;
try
{
retVal = df.parse(workflowDate);
}
catch (ParseException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
return retVal;
}