I have a table called Recharge in a Access Database.
Some of the fields are RechargeDate, Account, Number, etc.
I wanted to retrieve all records between two dates so I wrote the following query:
string Query = "select * from Recharge where Account='" + comboBox1.Text + "'
and RechargeDate between '"+dateTimePicker1.Value.Date.ToShortDateString()+"' and '"+dateTimePicker2.Value.Date.ToShortDateString()+"'"
The query runs fine but the only problem I've run in to is that I am only able to retrieve dates from a single Month.
If I request records from a span that encompasses more than a single month, I do not get the proper result.
Any help?
the query executes nice but the problem is i can only able to get details between the dates in single month, if the starting month and ending month differs i cant get the proper result plzz help me