Use DateTimeFormat
:
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm:ss");
DateTime dt = formatter.parseDateTime(string);
More Related Contents:
- How to calculate elapsed time from now with Joda-Time?
- Differences between Java 8 Date Time API (java.time) and Joda-Time
- Parse Date String to Some Java Object
- Time: How to get the next friday?
- Convert from java.util.date to JodaTime
- GPS Time Representation library
- Java-How to calculate accurate time difference while using Joda Time Jar
- How to convert java.util.Date to java.sql.Date?
- Timezone conversion
- How to convert a String to a Date using SimpleDateFormat?
- Unable to obtain LocalDateTime from TemporalAccessor when parsing LocalDateTime (Java 8)
- How to get milliseconds from LocalDateTime in Java 8
- What is the use of “lenient “?
- How to change TIMEZONE for a java.util.Calendar/Date
- In Java, how do I get the difference in seconds between 2 dates?
- How can I create a Java 8 LocalDate from a long Epoch time in Milliseconds?
- last day of month calculation
- Comparing time is incorrect when picking 12:00
- Mocking time in Java 8’s java.time API
- Get the week start and end date given a current date and week start
- How to compare two dates along with time in java
- How to transform currentTimeMillis to a readable date format? [duplicate]
- How to convert date time from one time zone to another time zone
- Java Best Practice for Date Manipulation/Storage for Geographically Diverse Users
- Android get Current UTC time [duplicate]
- Java Time Zone When Parsing DateFormat
- Java 8: Calculate difference between two ZonedDateTime
- Are there any cons to using Joda-Time?
- Date format conversion using Java
- How to combine date and time into a single object?