Is it possible to update modified date of the page programmatically no matter when page is changed or published. When assigning "SetChangedOnPublish" as true and a date is set, when the content is updated, the current date and time are set instead of the value which was assigned.
Example:
- Page X has Modified date as 21-August-2017
- Now they are changing the modified date by using below code.
writableNewsPage.Changed = [DATE CAN BE 01-AUGUST-2017, which they want to assign]; writableNewsPage.SetChangedOnPublish = true;
The content is updated with the current date and time instead of the date which was set (01-August-2017).
It is not possible to set the modified date to a specific date programmatically.
The date can only be changed by setting the SetChangedOnPublish property to true and then publish the page. This will in turn trigger an update of the modified date in the database. So it will set the date to the same one as when you publish the page.
Please sign in to leave a comment.