strmid(str,"2011-01-04",0,12,13);
sscanf(str, "p<->iii", year, month, day);//orsscanf("2011 01 04", "iii", year month, day); // etc