2

I am using jCalender to input date

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

enter image description here

Arulkumar
  • 12,966
  • 14
  • 47
  • 68
Pritesh
  • 23
  • 4

1 Answers1

1

I'm not java pro but SQL statement could be like this

select * from POSTS where Id = 1
       and Date between '2011/02/25' and '2011/02/27'

or can use

select * from POSTS where Id = 1
       and Date >= '2011/02/25' and Date <= '2011/02/27'
magic-sudo
  • 1,206
  • 9
  • 15
  • i am using jCalender component to pick up date in java.. and format specified only "MMM d, yyyy" How can search with String date in SqLite DB Query in java.. plz help me its vry urgent and important for me.. – Pritesh Jan 29 '16 at 06:34