I am using the Joda-Time library in Java, and have a date and time stored as an org.joda.time.DateTime object.
How can I reliably convert this DateTime object into a
you can try this simple code :
DateTime dt = new DateTime(); DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss"); String dtStr = fmt.print(dt);