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
Adhikar Patil
NA
481
127.9k
I want filter dataset using two dates
Aug 2 2018 2:37 AM
dt2 = ds.Tables[0].Select().Where(p => (Convert.ToDateTime(p["SignupDate"]) >= Convert.ToDateTime(txtFMinDate.Text)) && (Convert.ToDateTime(p["SignupDate"]) <= Convert.ToDateTime(txtFMaxDate.Text))).CopyToDataTable();
I want Above statement in the below format(This is not working).
DataView dataView = ds.Tables[0].DefaultView;
string where="";
where = "SignupDate >='" + Convert.ToDateTime(txtFMinDate.Text) + "'" + " AND SignupDate <='" + Convert.ToDateTime(txtFMaxDate.Text) + "'";
dataView.RowFilter = where;
DataTable dt = dataView.ToTable();
Filterds.Tables.Add(dt);
So, i want the perfect format.
Reply
Answers (
4
)
EEPLUS how to get range and loop
How i can use file manager in asp mvc like google drive or O