Below is my code
NSString *dateandtime =[NSString stringWithFormat:@"%@",self.eventtime];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"EEE, dd MMM yyyy HH:mm:ss Z"];
NSDate *dateFromString = [[NSDate alloc] init];
dateFromString = [dateFormatter dateFromString:dateandtime];
if i print my self.event name i am getting the output as Mon, 7 Jan 2013 15:30:00 CST
but when i pass this string in NSDateFormatter
i am getting null
value i don't know why i tried many
combinations
of date formats
, but i cant solve it, can anyone help me