Q:

Why does this not create a date?

I'm passing in a string like "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;
        }

A:

Use yyyy-MM-dd'T'hh:mm:ss format instead of YYYY-MM-DD'T'hh:mm:ss
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss", Locale.ENGLISH);

y - Year
M - Month in year
d - Day in month

