原文地址:http://bdcwl.blog.163.com/blog/static/765222652009104171521/ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Date date = sdf.parse("2009-11-04");//String-->Date String sdate = sdf.format(date );// Data-->String Ti
/** * java获取 当月所有的日期集合 * @return */public static List<Date> getDayListOfMonth() { List list = new ArrayList(); Calendar aCalendar = Calendar.getInstance(Locale.CHINA); int year = aCalendar.get(Calendar.YEAR);//年份 int month = aCalendar.get(Calendar.M
java获取取得Timestamp类型的当前系统时间java获取取得Timestamp类型的当前系统时间 格式:2010-11-04 16:19:42 方法1: Timestamp d = new Timestamp(System.currentTimeMillis()); 方法2: Date date = new Date(); Timestamp nousedate = new Timestamp(date.getTime()); ------------------------