Related questions
Formatting a Duration in Java 8 / jsr310
I am transitioning a project from Joda-Time to java8's native time libraries, and I have run into a snag.
I have been unable to find a formatter for Duration. I would like to have a custom String format of, …
Converting a date string to a DateTime object using Joda Time library
I have a date as a string in the following format "04/02/2011 20:27:05". I am using Joda-Time library and would like to convert it to DateTime object. I did:
DateTime dt = new DateTime("04/02/2011 20:27:05")
But I'm getting the following error :
Invalid format: "04/02/2011 14:42:17" is …
How to format Joda-Time DateTime to only mm/dd/yyyy?
I have a string "11/15/2013 08:00:00", I want to format it to "11/15/2013", what is the correct DateTimeFormatter pattern?
I've tried many and googled and still unable to find the correct pattern.
edit: I am looking for Joda-Time DateTimeFormatter, not Java's SimpleDateFormat..