1
Answer

C# linq select datetime range

dc

dc

12y
9.5k
1
In a linq to sql statement in a C# 2010 console application, I want to be able to select a specific datetime frame. The timeframe
would be between is between srtdatetime and enddatetime. 

var elocation = (from iw in eData.books
                join ip in eData.IPack on iw.PID equals ip.PID
                                    where ip.TNum == pkId
                                    and iw.idate is between srtdatetime and enddatetime
                                    select iw).FirstOrDefault();

Can  you tell me in linq to sql how to select a datetime frame in a where statement?
Answers (1)