The requirement i got is path_departure_date is having 2008-06-05 i want yyyy_path_departure_date year filed only 2008 .I want to conform whether the code i written is correct or notCode:memset(a,'\0',11); memset(str_date,'\0',9); strncpy(a,path_departure_date,4); result=strtok(a,delims); while(result!=NULL) { strcat(str_date,result); result=strtok(NULL,delims); } yyyy_path_departure_date=atoi(str_date);
Thanks & Regards,
vijay