Make SimpleDateFormat.parse() fail on invalid dates (e.g. month is greater than 12) April 10, 2023 by Tarik You need to make it non-lenient. Thus, format.setLenient(false); should do it.