Thursday 15 May 2014

iphone - Formatting a date in my titleForHeaderInSection -


I am working on a simple list application, and I want to set the date in a normal format in the title ForFeadHeaderInSection Part of uiTableView but I have some problems, it works to an extent, but giving me a lot of information, it shows:

2009-12-01 00:04:10 -0700

In the area where I 'd like the item was made, and especially a specific time bin In normal times, whether to show the date you please help me understand that I need to change what? Thanks !!

You can use:

  NSDateFormatter * outputFormatter = [ [NSDateFormatter alloc] init]; [OutputFormatter setDateFormat: @ "HE: mm 'on' EEE MMMM ']]; NSString * newDateString = [OutputFormer stringFormat: [NSDT's date]]; NSLog (@" newDet string% @ ", newDet string); // For US English, the output is: // newDateString 10:30 on Sunday July 11,  

You should also read


No comments:

Post a Comment