ios 日期时间打印
生活随笔
收集整理的這篇文章主要介紹了
ios 日期时间打印
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
NSDateFormatter *format = [[NSDateFormatter alloc] init];
[format setDateFormat:@"yyyy-mm-dd hh:mm:ss"];
NSString *strDate = [format stringFromDate:[NSDate date]];
DLog(@"%@", strDate);
?
其中DLog定義
#ifdef DEBUG
??? #define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
??? #define DLog(fmt, ...)
#endif
?
打印log如下:
[CViewController textFieldShouldReturn:] [Line 49] 2014-30-15 09:30:36
轉(zhuǎn)載于:https://www.cnblogs.com/ftrako/p/3520188.html
總結(jié)
以上是生活随笔為你收集整理的ios 日期时间打印的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 网站设计八步骤
- 下一篇: 网络蜘蛛Spider 工作原理