Hello all,
I have been looking over StackOverflow and have not found any answers yet, if I missed a post which answers this I apologize and would be grateful for the link.
I am trying to change a string "prod.Start" into a NSDate type for comparison with today's date. The following code myDate returns "1753-01-01 00:00:00 -075258"
CODE:
NSDateFormatter *format = [[NSDateFormatter alloc] init];
[format setFormatterBehavior:NSDateFormatterBehavior10_4];
[format setDateFormat:@"MM/dd/yyyy hh:mm:ss a"];
NSDate *myDate = [format dateFromString: prod.Start]; //prod.Start = 1/1/1753 12:00:00 AM
Any suggestions/tips would be appreciated.
Thanks
edit:
Works now : thanks for all the help. What I thought was an error was 12AM = 0 o'clock AM
I tried 12PM and output was "1753-01-01 12:00:00 -075258"
Thank you for also explaining the "-075258" = PST was curious about that.