} NSString*timeFormat = @"%Y-%m-%d"; NSString * sql = [NSString stringWithFormat:@"select * from T_TRAVEL_EXPENSE_RETURNTRIP where strftime('%@','now') = strftime('%@',SRV_DATE) and USER_ID='%@' order by CREATE_TIME desc",timeFormat,timeFormat,userId]; if([db open]) { FMResultSet * rs = [db executeQuery:sql]; while ([rs next]) {