-(NSDate*) convertStringToDate:(NSString*)stringToConvert
{
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
NSDate *date = [[NSDate alloc] init];
date = [dateFormat dateFromString:stringToConvert];
NSLog(@"convertStringToDate: %@", date);
return date;
}
No comments:
Post a Comment