开发者

Problem with Date Formatter

开发者 https://www.devze.com 2023-04-06 23:04 出处:网络
i want to show date. I am using code NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@\"MMddHHmmss\"];

i want to show date.

I am using code

NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"MMddHHmmss"];
NSDate *now = [[NSDate alloc] init];
NSString *theDate = [dateFormat stringFromDate:now];

But it shows 0921164432 PM.

i dont want to开发者_如何学JAVA show PM how can i do that


Have you tried [dateFormat setPMSymbol:@""];?

PS: As I can't reproduce the problem, I just can presume...

0

精彩评论

暂无评论...
验证码 换一张
取 消