Category Archives: lang

Java: Current Date without Time

static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("MM/dd/yyyy"); static Date getNowWithoutTime(){ Date nowWithoutTime = null; try { nowWithoutTime = DATE_FORMAT.parse( DATE_FORMAT.format(new Date())); } catch (ParseException e) { // Should not happend logger.error(e.getMessage()); } logger.info("nowWithoutTime: " + nowWithoutTime); return nowWithoutTime; }

Posted in java | Tagged , | Comments Off on Java: Current Date without Time