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
Alex Calidguid
1.5k
192
5.2k
using multiple datetimepicker in c# with MySql
Nov 29 2013 3:13 AM
I am using 2 datetimepicker.
1) any date select from first datetimepicker.
2) then another one date is select from second datetime picker.
my request is: the second datetimepicker selecting date only accept after first date.
how to compare from first date and second date.
EXAMPLE:
i.e) first selected date is 10/10/2011 ok.
then second datetimepicker selecting date accept only after first date i.e 11/10/2011
but can not accept before date that is 09/10/2011.
here's the code:
cnn.cmdOpen(cmdForm);
cmdForm.CommandText = " SELECT attendance.work,attendance.in_, attendance.out_,attendance.weekday,"
+ "attendance.date,employee.Empname,employee.Empno"
+ " FROM employee LEFT JOIN attendance ON employee.biomitricno = attendance.badgeno WHERE date >='" + DtFrom.Value.ToString() + "' AND date <='" + DtTo.Value.ToString() + "'";
MySqlDataAdapter da = new MySqlDataAdapter();
da.SelectCommand = cmdForm;
DataTable dtble = new DataTable();
da.Fill(dtble);
BindingSource bSource = new BindingSource();
bSource.DataSource = dtble;
dgVMonthly.DataSource = bSource;
Reply
Answers (
6
)
Datatable to excel, pdf and word
how to draw chart with multiple Y axis + c#