i have strings who look like this 20110525 .

how can i make to put ‘-‘ caracters in NSString variable ? to let dates look like this 2011-05-25 ?
My second question is how can i sort the dates to make the table look like this 20110525 then 20110526 ?Help please . Thank you
you can try using
sscanf(input,"%4d%2d%2s",&year,&month,&day)to parse input string andsprintf(output,"%d-%d-%d",year,month,day)to format your date.