public String fotmatDate(Date myDate) { SimpleDateFormat formatter = new SimpleDateFormat ("yyyy年MM月dd日 HH时mm分ss秒"); String strDate = formatter.format(myDate); return strDate; }
SimpleDateFormat sf = new SimpleDateFormat ("yyyy-MM-dd"); String str="1998-01-02"; Date dt = sf.parse(str);更为详细的请参照: http://www.csdn.net/expert/topic/711/711992.xml?temp=.6336176
SimpleDateFormat formatter = new SimpleDateFormat ("yyyy年MM月dd日 HH时mm分ss秒");
String strDate = formatter.format(myDate);
return strDate;
}
String str="1998-01-02";
Date dt = sf.parse(str);更为详细的请参照:
http://www.csdn.net/expert/topic/711/711992.xml?temp=.6336176