String str = ...; "2003-01-10";
java.text.SimpleDateFormat f[] = new SimpleDateFormat[]{
      new SimpleDateFormat("yyyy-mm-dd"),
      new SimpleDateFormat("hh:mm:ss"),
      new SimpleDateFormat("..."),
};
boolean isDate = false;
for(int i = 0; i < f.length && !isDate; i++) {
   try{
     f[i].parse(str);
     isDate = true;
   }catch(Exception e){}
}
System.out.println(str+" is date?"+isDate);