Hi Kin, I've tried the snippet in both Mac OS X and iOS and found that it still works. What are you doing prior to calling dateFromString: ?
Thanks, Nick On 11 Νοε 2011, at 10:13 π.μ., Kin Mak wrote: > The following code used to work fine prior to iOS 5. The dateFromString > method seems to stop working on iOS 5 and always returns null. I suspect this > is a bug introduced in iOS 5.0. Have anyone encountered the same issue? Or > do I miss something here? > > Any tips or hints will be highly appreciated. > > Thanks, > Kin > > > > NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; > [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss.SSS zzz"]; > > ..... > //E.g currentString = @"2011-11-11 11:00:00.000 CET"; > NSDate *date = [dateFormatter dateFromString:currentString]; > > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/nicktoumpelis%40gmail.com > > This email sent to nicktoumpe...@gmail.com -- Nick :wq _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com