Working in c#.
I have two date object named start_date_entered
and end_date_entered
and I have two columns in my table start_date
and end_date
. I have to query my table that if any of the dates between start_date_entered
and end_date_entered
are present in between start_date
and end_date
.
DateTime start_date_entered = Convert.ToDateTime('01/01/2018 12:00:00 AM');
DateTime end_date_entered = Convert.ToDateTime('03/01/2018 12:00:00 AM');
the database column start_date contains let say 25th march and end_date contains 27th march. If the both sequences have any date common then no row should be returned from the database. If there is any common date between both sequences then database should return the row.
select * from employee_leaves where ... between start_date and end_date
what should i write in "..." as I want to put a sequence of dates between start_date_entered
and end_date_entered
here
I have tried these,
Fetching Dates Which Comes Between StartDate and EndDate
How to list all dates between two dates [duplicate]
But haven't find any solution.