This Dateclass handles the age of each members and calculate the persons age by getting his birthday. Then we get actual date and substract it with birthday.
My problem is that a can't substract a SimpleDateFormat and a String. How can I fix this problem?
Date dt = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("ddMMyy");
System.out.print(sdf.format(dt));
ArrayList<String> Mem = Data.getCpr();
String newStr = Mem.toString();
This is a birthday we wish to use to substract
String birth = newStr.substring(1, 7);
System.out.print(" "+birth);
This is the substraction of a SimpleDateFormat and a String
int age = sdf - birth;