Using Joda-Time Library to Convert String to DateTime Format in Google Tasks API
问题 I have a date/time string which needs to be sent to the Google Tasks API but I can't figure out how to convert a Joda-Time library DateTime object to a Java DateTime object. I'm using Android as the platform. The string starts off as "2012/07/19 22:00:00" and is first converted to Iso format. Here is my code: Task task = new Task(); task.setTitle(title); task.setNotes(note); DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy/MM/dd HH:mm:ss"); DateTime dt = formatter.parseDateTime