Good day,
I have an NSDateFormatter which does not seem to look like the specific string I'm trying to convert. this particular instance
2009-10-16T09:42:24.999605
All my other dates are formatted the same and can be analyzed.
Here is the code that converts string to NSDate .
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSSSSS"]; [order setModifiedAtDate:[dateFormatter dateFromString:[orderDataDictionary valueForKey:@"ModifiedAt"]]];
order.ModifiedAtDate nil after calling dateFromString .
Does anyone else encounter cases where their dates cannot be converted to NSDates ?
Thanks,
iphone nsdate nsdateformatter
cnickelwebcom
source share