I want to make sql select sentence like this:
NSLog(@"sql = %@",[NSString stringWithFormat:@"select * from Table1 Where ID = %i AND '%@' = strftime('%Y',startDate)",ID,date]);
but it prints to me:
sql = select * from Table1 Where ID = 1 AND '2012' = strftime('Y',startDate)
%Y becomes Y, how i could prevent this ?
Add another
%to escape the%character: