01-时间和毫秒数的相互转换
//获取毫秒数的时间戳
long inter = [[NSDate date] timeIntervalSince1970]*1000;
NSLog(@"%ld",inter);
//把毫秒数转换成时间
NSDate *date = [NSDate dateWithTimeIntervalSince1970:inter/1000];
NSLog(@"%@",date);
01-时间和毫秒数的相互转换
//获取毫秒数的时间戳
long inter = [[NSDate date] timeIntervalSince1970]*1000;
NSLog(@"%ld",inter);
//把毫秒数转换成时间
NSDate *date = [NSDate dateWithTimeIntervalSince1970:inter/1000];
NSLog(@"%@",date);