TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sazzadur
NA
19
2.2k
How to Search date by two DateTimePickers
Mar 17 2018 2:35 PM
When I select date 3-5-18 to 3-17-18. The result is show only 3-5-18 to 3-16-18. And when I select 3-5-18 to 3-5-18 the result shows nothing on the Gridview.
My Coding
System.Data.SqlClient.SqlConnection cn= new System.Data.SqlClient.SqlConnection();
cnConnectionString=HR_And_Payroll.Propertys.Settings.Default. MyCon;
cn.Open();
SqlCommand cmd = new SqlCommand();
cmd.CommandType=CommandType.Text;
cmd.CommandText=" Select * Where Date >=@Date1 And Date<=@Date2"; cmd.Parameters. AddWithValue("@Date1", dateTimePicker1.Value);
cmd.Parameters. AddWithValue("@Date2", dateTimePicker2.Value);
Please anyone help me
Reply
Answers (
1
)
Unable to install Ubuntu operating system
How to upload files