当前位置: 代码迷 >> 综合 >> java转换时间格式 yyyy-MM-dd转成yyyy年MM月dd日
  详细解决方案

java转换时间格式 yyyy-MM-dd转成yyyy年MM月dd日

热度:7   发布时间:2024-02-19 09:45:31.0
public static void main(String[] args) throws Exception{Date date = new SimpleDateFormat("yyyy-MM-dd").parse("2005-06-09"); 
String now = new SimpleDateFormat("yyyy年MM月dd日").format(date);System.out.println(now);}