日期转换
SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = ft.parse("1970-01-01 13:20:30"); System.out.println(date); String dateStr = ft.format(date); System.out.println(dateStr);
日期转换
SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = ft.parse("1970-01-01 13:20:30"); System.out.println(date); String dateStr = ft.format(date); System.out.println(dateStr);