Why does my NSDateFormatter sometimes return an a.m. or p.m. with yyyyMMddHHmmssSSS
来源:互联网 发布:淘宝卖家能知道买家 编辑:程序博客网 时间:2024/06/04 23:36
需要设置Locale
NSDateFormatter *dateFormatter = [[[NSDateFormatteralloc] init] autorelease];
[dateFormattersetDateFormat:@"yyyyMMddHHmmss"];
NSDate *currentDate = [[[NSDatealloc] init]autorelease];
[dateFormatter setCalendar:[NSCalendarautoupdatingCurrentCalendar]];
[dateFormatter setLocale:[[[NSLocalealloc] initWithLocaleIdentifier:@"en_US"]autorelease]];
NSString *strDate = [dateFormatterstringFromDate:currentDate];
http://stackoverflow.com/questions/7072267/why-does-my-nsdateformatter-sometimes-return-an-a-m-or-p-m-with-yyyymmddhhmmss
0 0
- Why does my NSDateFormatter sometimes return an a.m. or p.m. with yyyyMMddHHmmssSSS
- a m p
- ORA-01843: not a valid month;ORA-01855: AM/A.M. or PM/P.M. required
- ORA-01855: AM/A.M. or PM/P.M. required错误解决
- ORA-01855: AM/A.M. or PM/P.M. required问题排查与解析
- ORA-01855: AM/A.M. or PM/P.M. required问题排查与解析
- ORA-01855: AM/A.M. or PM/P.M. required问题排查与解析
- Remove M Characters “Control M” or “^M” or “CTRL M” Characters in a UNIX file
- ORA-01855: 要求 AM/A.M. 或 PM/P.M.
- ORA-01855 :要求AM/A.M. 或 PM/P.M.
- ORA-01855 :要求AM/A.M. 或 PM/P.M.
- Why I'm Here
- Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral or
- Why does JAXB put @XmlRootElement sometimes but not always
- Why does DBA_TAB_MODIFICATIONS sometimes have no values [ID 762738.1]
- ORA-01855: AM/A.M. or PM/P.M. required问题排查与解析---向Oracle中插入日期数据时出现的问题
- Erlang: Why does this fail with a 'badarith' exception?
- I found a bug with CCParticleSystem.m
- 上传图片的方法
- C语言 输出系统时间
- poj 3259 Wormholes(基础Bellman-Ford)
- Android studio使用的小问题,小技巧总结----持续更新中
- Vim 实用技术,第 2 部分: 常用插件
- Why does my NSDateFormatter sometimes return an a.m. or p.m. with yyyyMMddHHmmssSSS
- SSH学习四 Hibernate多对一的关系 + 增删改查
- SQL的四种连接-左外连接、右外连接、内连接、全连接
- GCD理解(三)
- GA追踪代码详解
- stdout 与 stderr区别
- CGRectInset、CGRectOffset详解
- MTK中加入ETT测试代码
- 当启动多个Activity后从最后一个activiy越级返回方法