Java - Date Format converter? [duplicate]

一笑奈何 提交于 2019-12-02 13:38:05

I would suggest using two SimpleDateFormat objects for this.

Date date = new SimpleDateFormat("ddMMyy").parse( dateString);
String result = new SimpleDateFormat("dd:MM:yy").format( date );

For the format, see the documentation: http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!