ps.setString(1, begintime);
 public static final String borrowQueryByBorrowEndTimeAndBookname = "select * from borrow where borrowTime >= convert(datetime,?) and barcode in (select barcode from bookinfo where bookname like ?) order by ID";

解决方案 »

  1.   

    数据库中如果是日期类型>   <  <>   =应该可以比较
      

  2.   

    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]从字符串转换为 datetime 时发生语法错误。
      

  3.   

    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]从字符串转换为 datetime 时发生语法错误。
      

  4.   

    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]从字符串转换为 datetime 时发生语法错误。