I want to convert a java.util.Date object to a String in Java.
java.util.Date
String
The format is 2010-05-30 22:15:52
2010-05-30 22:15:52
Commons-lang DateFormatUtils is full of goodies (if you have commons-lang in your classpath)
//Formats a date/time into a specific pattern DateFormatUtils.format(yourDate, "yyyy-MM-dd HH:mm:SS");