In
DateTime dt = fmt.parseDateTime("2010-04-28'T'HH:mm:ss");
your aren't passing in the actual time values. Something like this would parse:
DateTime dt = fmt.parseDateTime("2010-04-28T12:30:45");Stephen On 27 April 2010 19:24, Sean Mitchell <[email protected]> wrote: > Hi All... > > New to Joda Time, and running into an issue which Google and TFM hasn't > helped me resolve. From my reading of the docs, "yyyy-MM-dd'T'HH:mm:ssZ" > should be a valid pattern, but the code below fails. Can anyone tell me > where I'm going wrong? > > DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ssZ"); > DateTime dt = fmt.parseDateTime("2010-04-28'T'HH:mm:ss"); > > > java.lang.IllegalArgumentException: Invalid format: "2010-04-28'T'HH:mm:ss" > is malformed at "'T'HH:mm:ss" > at > org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:673) > > Cheers, > > Sean > > ------------------------------------------------------------------------------ > > _______________________________________________ > Joda-interest mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/joda-interest > > ------------------------------------------------------------------------------ _______________________________________________ Joda-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/joda-interest
