Date formatter for the google calender API
<>This question already has an answer here:
Answers
To get the NSDate from that string:
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSS Z"]; NSDate *myDate = [dateFormat dateFromString:@"2013-05-03T22:30:00.000+02:00"];
Once you have your NSDate, you can do the same to get the representation:
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:"MMM d yyyy"]; NSString *myString = [myDate stringFromDate:myDate];
You can consult the whole date formatting options here: