/**
* 时间戳的转换
* &-timestr 待传入字符串
* 返回转换过的字符串
*/
* 时间戳的转换
* &-timestr 待传入字符串
* 返回转换过的字符串
*/
+ (NSString *)TimeTotransformtheData:(NSString *)timestr;
/**
* 时间戳转换为字符串
*/
+ (NSString *)TimeTotransformtheData:(NSString *)timestr{
NSString * timeStampString = timestr;
NSTimeInterval _interval=[[timeStampString substringToIndex:10] doubleValue];
NSDate *date = [NSDate dateWithTimeIntervalSince1970:_interval];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
NSString *strDate = [dateFormatter stringFromDate:date];
return strDate;
* 时间戳转换为字符串
*/
+ (NSString *)TimeTotransformtheData:(NSString *)timestr{
NSString * timeStampString = timestr;
NSTimeInterval _interval=[[timeStampString substringToIndex:10] doubleValue];
NSDate *date = [NSDate dateWithTimeIntervalSince1970:_interval];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
NSString *strDate = [dateFormatter stringFromDate:date];
return strDate;
}