SimpleDateFormat formato = new SimpleDateFormat("yyyy-MM-dd"); System.out.println(formato.format(new Date()));