NSDate *date = [[[NSDate alloc] init] autorelease];
date = [date dateByAddingTimeInterval:120];
NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
[dateFormatter setDateFormat:@"yyyy-MM-dd"];
NSString *date1 = [dateFormatter stringFromDate:date];
[dateFormatter setDateFormat:@"HH:mm:ss"];
NSString *date2 = [dateFormatter stringFromDate:date];
[NSString stringWithFormat:@"%@T%@-07:00", date1, date2]
No comments:
Post a Comment