objective c - How to set a custom date format in iOS? -


i want display data int next format: 14:23 sep 10,2012.how can this?

use nsdateformatter

nsdateformatter *dateformatter = [[nsdateformatter alloc] init]; [dateformatter setdateformat:@"hh:mm mmm dd,yyyy"]; nsstring *stringfromdate = [dateformatter stringfromdate:[nsdate date]]; nslog(@"today : %@", stringfromdate); 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

ios - iPhone/iPad different view orientations in different views , and apple approval process -

Shrink a YouTube video to responsive width -