i want to convert the string into nsdate format.
here is my string NSString str=@"Sunday, June 6, 2010 5:00:00 AM CDT";
my code is
NSDateFormatter * Dateformats= [[NSDateFormatter alloc] init];
[Dateformats setDateFormat:@"MM/DD/yyyy hh:mm:ss"]; //ex @"MM/DD/yyyy hh:mm:ss"
NSDate *myDate=[Dateformats dateFromString:str];
NSLog(@"%@",myDate);
but it is displays null so show me the way to display the date in MM/DD/yyyy hh:mm:ss
please friends help me ,how to do this