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
Shyja Abraham
NA
69
0
datetimepicker
Apr 11 2011 2:47 AM
i have a form with datetimepicker,button,datagridview. in SQL i have a table with feeid,feeno,classid,feedate,total named fee.
when we click the button, I want to select all the data from sql according to Selected date
(datetimepicker) and it will displayed in datagridview.
i use this code. but this is not working.
private void button1_Click(object sender, EventArgs e)
{ cmd.CommandText = "select * from fee where feedate='" + DateTime.Parse(dateTimePicker1.Value.ToString()) + "'"; da.SelectCommand = cmd;
da.Fill(ds, "name");
DataTable dt1 = ds.Tables["name"];
//dt.Clear();
displaygrid.DataSource = dt1;
}
Reply
Answers (
1
)
DateTime in db only shows date w/ time of zero
Invalid Column Error