我使用日历在jsp文件中输入日期
<sj:datepicker id="startDate" name="startDate" readonly="true" maxDate="d" changeYear="true"
buttonImageOnly="true" displayFormat="dd-M-y" yearRange="2000:2200" />
作为输出,它会给出这样的日期09-Nov-17
但是在数据库中,日期看起来像09-NOV-17
,因为我使用了日期数据类型。
我编写了sql以使用以下数据查找数据
if (inputBean.getStartDate() != null && !inputBean.getStartDate().trim().isEmpty()) {
where += " and c.startDate = '" + inputBean.getStartDate().trim() + "'";
}
但它没有通过搜索输入日期来提交数据库中的数据,也没有显示错误。我怎么能摆脱这个。