当前位置:Gxlcms > mysql > IT忍者神龟之date日期回顾

IT忍者神龟之date日期回顾

时间:2021-07-01 10:21:17 帮助过:38人阅读

Calendar cal = Calendar.getInstance(); cal.get(Calendar.DAY_OF_MONTH); cal.get(Calendar.MONTH); cal.get(Calendar.YEAR); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(yyyyMMdd); String date=simpleDateFormat.format(new Date()); Str

Calendar cal = Calendar.getInstance();

cal.get(Calendar.DAY_OF_MONTH);
cal.get(Calendar.MONTH);

cal.get(Calendar.YEAR);

SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
String date=simpleDateFormat.format(new Date());
String y=date.substring(0,4);
String m=date.substring(4,6);
String d=date.substring(6,8);

人气教程排行