Tuesday, August 28, 2012

Date Formatting

Sometimes its necessary to get dates and format them with some kind of irrelevant characters in place. For Example 2012-08-09T05:05:68. In such a scenario how can we convert this date without removing the T by string manipulation?

The format string does allow that. You have to just place 'T' in the format string where the T will occur in the String that should be parsed.

Like "yyyy-MM-dd'T'hh:MM:ss".