- (NSString *)timeStringWithDate:(NSDate *)date { NSDateFormatter *dateForm = [[NSDateFormatter alloc] init]; dateForm.dateFormat = @"yyyy-MM-dd HH:mm:ss"; NSString *timeStr = [dateForm stringFromDate:date]; return timeStr; }
- (NSString *)timeStringWithDate:(NSDate *)date { NSDateFormatter *dateForm = [[NSDateFormatter alloc] init]; dateForm.dateFormat = @"yyyy-MM-dd HH:mm:ss"; NSString *timeStr = [dateForm stringFromDate:date]; return timeStr; }