1 +(NSString*)getTimeFromTimeStamp:(NSString*)dateStamp 2 { 3 4 NSDate *confromTimesp = [NSDate dateWithTimeIntervalSince1970:dateStamp.floatValue]; 5 NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; 6 [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss.fff"]; 7 //转换成字符串 8 NSString *timeStr = [formatter stringFromDate:confromTimesp]; 9 return timeStr; 10 }