NSDateFormatter and time
NSDateFormatter and time
- Subject: NSDateFormatter and time
- From: Greg Hoover <email@hidden>
- Date: Fri, 29 Jun 2007 16:33:10 -0700
I've read that the NSDateFormatter is pretty buggy, but it seems that
this trivial bit of code should work.
id value = @"1/1/07 4:00pm";
NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init]
autorelease];
[dateFormatter setDateStyle: NSDateFormatterShortStyle];
[dateFormatter setTimeStyle: NSDateFormatterShortStyle];
NSDate *date = [dateFormatter dateFromString: value];
All I get as a response in null. Am I missing something, or is
NSDateFormatter really this bad?
Thanks.
Greg
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden