N
N
n2932017-07-25 13:23:25
LINQ
n293, 2017-07-25 13:23:25

Linq. How to select records falling within a given date range?

There is a table, it has two fields with dates: StartDate (StartDate) and EndDate (EndDate)
I need to write a query that displays all records that meet the condition:
If EndDate - StartDate = 3 months, then display the record.
Please help me make a request, I can't figure it out.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
n293, 2017-07-25
@n293

Understood, there will be something like
(a.EndDate.Value - a.StartDate).TotalDays < 90

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question