SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Date exp = sdf.parse(sdf.format(c.getTime()));