import java.text.SimpleDateFormat;
import java.util.Date;
public class Main {
public static void main(String[] args) throws Exception {
SimpleDateFormat sdfSource = new SimpleDateFormat("dd/MM/yy");
Date date = sdfSource.parse("12/11/09");
SimpleDateFormat sdfDestination = new SimpleDateFormat("MM-dd-yyyy hh:mm:ss");
System.out.println(sdfDestination.format(date));
}
}
|