`
咖啡动力
  • 浏览: 435773 次
  • 性别: Icon_minigender_2
  • 来自: 北京
社区版块
存档分类
最新评论

objective-c获取当前时间

阅读更多

NSDateFormatter *nsdf2=[[[NSDateFormatter alloc] init]autorelease];

 

[nsdf2 setDateStyle:NSDateFormatterShortStyle];

 

[nsdf2 setDateFormat:@"YYYYMMDDHHmmssSSSS"];

 

NSString *t2=[nsdf2 stringFromDate:[NSDate date]];

 

long curr=[t2 longLongValue];

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics