import java.util.*;
import java.text.*; public class TestDateFormat {
public static void main(String[] args)
{
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy年MM月dd日"); try
{
Date d = sdf2.parse("2003年03月15日");
System.out.println(sdf1.format(d));
}catch(Exception e)
{
System.out.println(e.getMessage());
}
}
05-11 17:54