Developer Forum »
How to change 'last changed date'
31 posts

Hi,

Is there a way to change the last changed date for a node programmatically?

I've tried setting myNode.ChangeDate = myDate but I'm guessing that myNode.UpdateChanges() changes it again afterwards.

181 posts

Hi!

It should work to just set the change date directly. The following code works for me:

ArticleBase article = WAFRuntime.Engine.SystemSession.GetContent(WAFContext.Request.NodeId);
article.ChangeDate = article.ChangeDate.AddMonths(10);
article.UpdateChanges();
31 posts

You're absolutely right. The problem was in my code. After I changed a few things around it now works just fine. Sorry for any inconvenience :)

1