I get the date from URL as GMT Format as follows.
Thu, 13 Nov 2010 05:15:01 GMT
I want to display that date as ordinary format.
I used the following code.
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"EEE, dd MMM yyyy HH':'mm':'ss"];
NSDate *date = [dateFormatter dateFromString:@"Thu, 13 Nov 2010 05:15:01"];
NSString *strDate = [dateFormatter stringFromDate:date]; //[NSDate date]]; // Ordinary Format
NSLog(@"Date is ........ %@", strDate);
[dateFormatter release];
This above code display the following output.
Date is ........ Sat, 13 Nov 2010 05:15:01
But when I put the date as follow the date "Thu, 13 Nov 2010 05:15:01 GMT" in NSDate then the out put is display as NULL.
How I will edit this
[dateFormatter setDateFormat:@"EEE, dd MMM yyyy HH':'mm':'ss"];
to this date "Thu, 13 Nov 2010 05:15:01 GMT"