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? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -