我正在使用 MS-SQL 服务器。我在Convert
. 这是我的查询:
String query1="select * from pat.dbo.Demand_Register
where (select (Convert (datetime,Payment_Date,103)) as pd
from pat.dbo.Demand_Register)
between '"+frmDate1+"' and '"+toDate1+"' ";
和例外:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Syntax error converting datetime from character string.