Try our conversational search powered by Generative AI!

Update Changed date?


Can i update the changed date by code?

I´m trying like this.

var writablePage = page.CreateWritableClone();

writablePage.Changed = theNewDate;

DataFactory.Instance.Save(writablePage, SaveAction.Publish);

Jul 09, 2015 14:13


You could try to use UIDefaultValueForSetChangedOnPublish configuration option. The similar question was on the forum before:

Jul 09, 2015 14:24

Hi, but i need a specific date, not the date i publish the page. If i use SetChangedOnPublish then i get the date when the page is publish

Jul 09, 2015 14:51

I found that in ContentSaveDB the change date and a publish date could be overriden by using UseIChangeTrackingSaved.

But instead of setting Changed property try to set Saved property.  The code is below.

var writablePage = page.CreateWritableClone();
writablePage.Saved = theNewDate;

EPiServer.BaseLibrary.Context.Current[ContentSaveDB.UseIChangeTrackingSavedKey] = new object();

DataFactory.Instance.Save(writablePage, SaveAction.Publish);
Jul 09, 2015 15:44
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.