+ (NSString *)GetCurrentTimeDate:(long64)iDenty{
NSDate *pDate = [NSDate dateWithTimeIntervalSince1970:(iDenty)/1000];
NSDateFormatter *pFormatter = [[NSDateFormatter alloc]init];
[pFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
return [pFormatter stringFromDate:pDate];
}
//精确到秒
+ (NSString *)GetCurrentTimeDate2:(long64)iDenty{
NSDate *pDate = [NSDate dateWithTimeIntervalSince1970:(iDenty)/1000];
NSDateFormatter *pFormatter = [[NSDateFormatter alloc]init];
[pFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
return [pFormatter stringFromDate:pDate];
}
网友评论