i had take two textbox on window form and i want all dates between that two textbox
date format in database id "dd/mm/yyyy"
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
g sPosted May 11, 2015, 8:35 AM
Fully Explain With Screen Shots Below Links
http://dotnetdrizzles.blogspot.com/2015/05/compare-two-dates-in-between-sql-query.html
http://screenshotdrizzles.blogspot.in/2015/05/compare-two-dates-in-between-sql-query.html
Manoj BhoirPosted May 9, 2015, 10:46 AM
You can use below SQL Query to Select Data From Database for specific date range.
Select * From TableName Where DateColumnName BETWEEN 'YYYY-MM-DD' AND 'YYYY-MM-DD'
// Assumes that connection is a valid SqlConnection object.
string queryString = "SELECT Column1, Column2 FROM TableName";
SqlDataAdapter adapter = new SqlDataAdapter(queryString, connection);
DataSet data = new DataSet();
adapter.Fill(data);