I configured Solr index to the path where I created some articles using templates, templates have the same fields with data type as in below model
<Root>/sitecore/content/Articles</Root>
My model looks like this
public class Article : SearchResultItem
{
[IndexField("_uniqueid")]
public string ItemPath { get; set; }
[IndexField("_group")]
public string Id { get; set; }
[IndexField("title")]
public string Title { get; set; }
[IndexField("publisheddate")]
public DateTime PublishedDate { get; set; }
[IndexField("summary")]
public string Summary { get; set; }
}
When I query I can get the list of articles and I can read correct PublishedDate, but when I extend my query where I want articles in a year
list.Where(c => c.PublishedDate.Year == 2017).ToList();
It returns zero rows