1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Change date of the news items

Change date of the news items

3 posts, 0 answered
  1. Vitaly
    Vitaly avatar
    13 posts
    Registered:
    04 Mar 2009
    10 Nov 2010
    Link to this post
    Hello all,
    I need change date of the news which was published at the site. How can I  make it? 
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    11 Nov 2010
    Link to this post
    Hi Vitaly,

    The NewsItem has a public property PublicationDate that you can use to switch the publication date of the item. There is a property DateCreated - gets or sets the date and time the content was created. By default the date created in DateTime.UtcNow;

    If you work programmatically you can use the fluent API

    App.WorkWith().ContentItems().Where(ci => ci.Id == contentItemId).ForEach(ci =>
    {   
    // set content item property here.                                                                              
    }).SaveChanges();

    You can see all properties exposed by ContentItem in our dev manual.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Vitaly
    Vitaly avatar
    13 posts
    Registered:
    04 Mar 2009
    15 Nov 2010
    Link to this post
    Thank you for your help!
3 posts, 0 answered