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
venkat ramana
NA
98
0
LINQ Dates Overlapping logic
May 8 2015 10:24 AM
StudentId StartDate EndDate
1 1/1/2013 31/12/2013
1 1/1/2014 31/12/2014
2 1/1/2013 1/11/2013
2 1/1/2015 31/12/2015
My LIST contains sample date like above.Here student "1" continued next year also,
In this case i want to show one record for him like below.
Here student 2 is discontinued so in this case i want to show two records also.
Finally i want to show the output like below .How Can i do this using LINQ query ?
StudentId StartDate EndDate
1 1/1/2013 31/12/2014
2 1/1/2013 1/11/2013
2 1/1/2015 31/12/2015
Reply
Answers (
3
)
sum values in datatable using linq based on conditions
how to get value from var in linq