首页 > 编程知识 正文

oracle 字符串转日期,java字符串转日期格式

时间:2023-05-04 12:22:59 阅读:11742 作者:3186

展开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 ) {

}

}

}

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。