NSDateFormatter的使用
来源:互联网 发布:剑侠情缘挂机软件 编辑:程序博客网 时间:2024/05/22 05:18
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
//设定时间格式,这里可以设置成自己需要的格式
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
//用[NSDate date]可以获取系统当前时间
NSString *currentDateStr = [dateFormatter stringFromDate:[NSDate date]];
//输出格式为:2010-10-27 10:22:13
NSLog(@”%@”,currentDateStr);
//alloc后对不使用的对象别忘了release
[dateFormatter release];
- NSDateFormatter的使用
- NSDate, NSDateFormatter的使用
- iOS NSDateFormatter 日期的使用
- NSDateFormatter使用
- NSData 和NSDateFormatter的使用总结
- NSData 和NSDateFormatter的使用总结
- NSDateFormatter使用总结
- objc:NSDateFormatter使用备忘
- NSDateFormatter使用思考
- iOS开发之NSDateFormatter的NSLocale使用en_US_POSIX还是en_US
- iOS NSDateFormatter 和 NSDate简单使用 时间戳的转换
- NSDateFormatter的格式字符串
- 关于NSDateFormatter的格式
- NSDateFormatter的格式字符串
- NSDateFormatter的格式字符串
- NSDateFormatter的用法
- NSDateFormatter的用法
- NSDateFormatter的格式
- Android通过tcpdump抓包
- 10大iOS开发者最爱的库
- 初窥函数指针
- oracle 物化视图介绍
- KVM 虚拟机在物理主机之间迁移的实现
- NSDateFormatter的使用
- 【phpcms-v9】登陆页、注册页、会员中心页logo图的替换
- OpenCV2.0 ——PCA算法实现core
- vc动态遍历word中的书签名(使用自动化接口)
- Linux Socket学习(一) .
- 运算放大器之开环增益
- C#把sql server里是数据导出到excel
- hgeAnimation使用详解
- BASH 的基本语法