SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Calendar c = Calendar.getInstance(); c.add(Calendar.MONTH, 0); c.set(Calendar.DAY_OF_MONTH, 33); c.set(Calendar.HOUR_OF_DAY, 8); c.set(Calendar.MINUTE, 30); c.set(Calendar.SECOND, 0); String first = format.format(c.getTime()); System.out.println("===============first:" + first); Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.MONTH, 1); calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMinimum(Calendar.DAY_OF_MONTH)); calendar.set(Calendar.HOUR_OF_DAY, 8); calendar.set(Calendar.MINUTE, 30); calendar.set(Calendar.SECOND, 0); System.out.println(format.format(calendar.getTime())); Date date = c.getTime(); System.out.println(date.getTime());