展开gxdhb
publicstaticvoidmain (stringcqdknargs ) throws Exception{ )。
datedate=newsimpledateformat (yyyy-mm-DD ).parse ) (2005-06-09 );
string now=newsimpledateformat (yyyy年MM月dd日) ).format ) date;
}
输出结果: 2005年06月09日
公共类bb {
publicstaticvoidmain (stringcqdknargs ) {
//todo自动- generated method stub
simpledateformatdf=newsimpledateformat (yyymmdd hhmmss );
string datestring=' 20071128175545 ';
try {
datedate=df.parse(datestring;
}catch(exceptionex ) {
}
}
}