Converting a date string to a DateTime object using Joda Time library
Use DateTimeFormat
:
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm:ss");DateTime dt = formatter.parseDateTime(string);
Use DateTimeFormat
:
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm:ss");DateTime dt = formatter.parseDateTime(string);