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
Format formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String s = formatter.format(date);