More in this section

Forums / Developing with Sitefinity / Search By Publicationdate

Search By Publicationdate

2 posts, 0 answered
  1. Gary
    Gary avatar
    6 posts
    04 Jul 2012
    16 Sep 2013
    Link to this post
    Hi all,

    I have a custom search control and logic. I want to search all the contents published on specific date. But the publicationdate is DateTime format. How can I write a query to filter by a specific date? Thanks!
  2. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    31 May 2017
    19 Sep 2013
    Link to this post

    You could get all items Where.(p => p.PublicationDate.Day == date).

    The date could be specified by the following code:
    var date = new DateTime(2013, 09, 19).Day;

    Stefani Tacheva
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered