devxlogo

June 2, 2017

Can’t use the “Between” Keyword in a LINQ Query

You can’t use the “Between” keyword in a LINQ query. The sample snippet below shows how you translate between two date fields. DateTime fromDate = DateTime.Now.AddMonths(-3); DateTime endDate = DateTime.Now;