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

  

posted on 2016-08-28 23:01  wxm5558  阅读(896)  评论(0编辑  收藏  举报