首页 > 代码库 > iOS sqlite查询当天日期的数据

iOS sqlite查询当天日期的数据

  }    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]) {

  

iOS sqlite查询当天日期的数据