Java Date and Calendar examples - Java web development tutorials
Hello, I would propose to use always DateFormat with setLenient(false) setting. Othwerwise unexpected errors might occur. SimpleDateFormat sdf = new SimpleDateFormat(“dd-M-yyyy hh:mm:ss”); sdf.setLenient(false); String dateInString = “01-13-1982 10:20:56″...