I have a string like "1512". I need to convert it to a date 2015-12-31 23:59:59.
In that case, I am using Java Dateformat parse.
My code:
private static final dateformat = new SimpleDateFormat("yyMM");
public static boolean checkDate(String date){
Date date = dateformat.parse(date);
}
It can give date upto 20 years. When date is "3610", it gives, 1936, instead of 2036 (of the current century).