using System.Collections.Generic;
public static void Main()
var today = DateTime.Today;
var data = Enumerable.Range(-12,42).Select(x=> new Account{CreatedOn = today.AddMonths(x), ClosedDate = today.AddMonths(x+3) } );
var fromDate = today.AddMonths(-3);
var toDate = today.AddMonths(3);
Console.WriteLine("Data :"+data.Count()); data.Dump();
(x.CreatedOn >= fromDate && x.CreatedOn <= toDate)
|| (x.ClosedDate >= fromDate && x.ClosedDate <= toDate)
Console.WriteLine("\n\nResult"+result.Count()); result.Dump();
public DateTime CreatedOn {get;set;}
public DateTime ClosedDate {get;set;}