title: How to convert a date string like “2011-06-25T11:00:26+01:00” to a long like iphone?
body: <p>I need to convert this string date "2011-06-25T11:00:26+01:00” into a long like value.</p>
  
  <p>I tried this </p>
  
  <pre><code>NSDateFormatter *df = [[[NSDateFormatter alloc] init] autorelease];
  
  [df setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]];
  
  [df setDateFormat:@"yyyy-MM-ddHH:mm:ssZ"];
  
  NSDate *date = [df dateFromString:[time stringByReplacingOccurrencesOfString:@"T" withString:@""]];
  
  [df setDateFormat:@"eee MMM dd, yyyy hh:mm"];
  
  NSLog(@"time%@", time);
  long lgTime =  (long)[date timeIntervalSince1970];
  </code></pre>
  
  <p>but this doesn't work. Please help me.</p>
  
  <p>Thanks in advance.</p>