want to ask about NSDate Formatter
i want to create Date and time like that
Friday, 12 June 2013
my code
NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
[dateFormatter setDateFormat:@"EEEE"];
NSLog(@"%@", [dateFormatter stringFromDate:[NSDate date]]);
output=
Saturday
does anyone know how to create date like above and convert it to nsstring?
Do you want to show that string to the user? If so set the
dateStylebecause you want a locale aware string.Users that use the US locale will get
Saturday, November 24, 2012.And german users will get
Samstag, 24. November 2012.