NSDate *date_of_purchase;
sqlite3_bind_text(addStmt, 5, [date_of_purchase UTF8String], -1, SQLITE_TRANSIENT);
When I run this code, the above error(NSDate may not respond to UTF8String) was coming. Can any one help?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes. NSDate doesn’t have a method called “UTF8String”: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/Reference/Reference.html
That is a method of NSString. So you might have to create an instance of NSString from your date first, like so: Convert NSDate to NSString