我正在使用jCalender输入日期
String from_date = ((JTextField) txt_bilty_date_start.getDateEditor().getUiComponent()).getText();
String to_date = ((JTextField) txt_bilty_date_end.getDateEditor().getUiComponent()).getText();
String sql = " "; //what query I need to use
解决方法:
我不是Java专业人士,但SQL语句可能是这样的
select * from POSTS where Id = 1
and Date between '2011/02/25' and '2011/02/27'
或可以使用
select * from POSTS where Id = 1
and Date >= '2011/02/25' and Date <= '2011/02/27'
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!