I have a date/time that I would like to parse to make more readable. The original format is like so:
2009-04-26T19:39:00-04:00
This is the date, then 24hr time which is separated by a T, then the time zone. In this case, the time zone is EDT, -4 hours. I have found that I can parse this with something like
formatter = new SimpleDateFormat ("yyy-MM-ddTHH:mm:ssZ");
This doesn't work, because of the T in the middle I assume. I have also tried
formatter = new SimpleDateFormat ("yyy-MM-dd" + "T" + "HH:mm:ssZ");
This doesn't work either. I get a compile error "Illegal patter character 'T'" for both of these. I am about to split the string into two sections, one with date before T, and one with time after T. Before I do this, I was just wondering if there is a cleaner way to do this, using some wildcard possibly?