Search Results

Search found 1 results on 1 pages for 'deamonsarea'.

Page 1/1 | 1 

  • NSDateFormatter Does not convert correctly

    - by deamonsarea
    Hi, I have a NSString which is passed from an xml feed........ NSString *strDate =@"Thu, 22 Apr 2010 10.30 am CEST"; I'm currently using this code to format the date........ NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"EEE, dd MMM yyyy hh:mm a vvvv"]; NSDate *myDate = [dateFormatter dateFromString:date]; [dateFormatter setDateFormat:@"HH"]; NSLog(@"%@", [dateFormatter stringFromDate:myDate]); I want to format my string only to display only hours and currently I'm getting value like this. strDate =@"2010-04-10 14:00:00 +0530"; Can anyone please help me with this?......

    Read the article

1