Jessei
11/29/2016 - 10:35 AM

java时间

java时间

//SimpleDateFormat dateformat= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		Calendar shenpiCalendar = Calendar.getInstance();
		shenpiCalendar.set(Calendar.HOUR_OF_DAY, 0);
		shenpiCalendar.set(Calendar.MINUTE, 0);
		shenpiCalendar.set(Calendar.SECOND, 0);
		String stampStartString = dateformat.format(shenpiCalendar.getTime().getTime());
		//30天之后的calendar
		shenpiCalendar.add(Calendar.DAY_OF_YEAR, 60);
		shenpiCalendar.set(Calendar.HOUR_OF_DAY, 23);
		shenpiCalendar.set(Calendar.MINUTE, 59);
		shenpiCalendar.set(Calendar.SECOND, 59);
		//Timestamp stampEnd = new Timestamp(yjzhouCalendar.getTime().getTime());
		String stampEndString = dateformat.format(shenpiCalendar.getTime().getTime());






new Timestamp(System.currentTimeMillis())