首页 >数据库 >mysql教程 >IT忍者神龟之date日期回顾

IT忍者神龟之date日期回顾

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-06-07 16:03:401185浏览

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);

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn