Home  ›  BLOG  ›  2008  ›  5  ›  9  ›  How to change the creation date of an Umbraco CMS node
How to change the creation date of an Umbraco CMS node
Freitag, 09. Mai 2008, Christoph Ertl

This is not a common task, that's why Umbraco doesn't support that directly. But sometimes it's useful to correct the creation date of a page to get consistent data.

In my case I moved old blog entries to my Umbraco blog and created posts out of notes I've taken in the past and wanted them both to occur in a correct timeline.

Ok, here we go:

The node ID

First we must know the id of the node we want to change. There are several ways to accomplish that:

  1. In the Umbraco UI move the mouse over the node you want to change and have a look at the URL displayed in the status bar (Internet Explorer).
    It's javascript:openContent(1111) where 1111 is the id of the node. This also works with the toolbar buttons (save and publish) of the content editor.
    At the end we have to publish this node so this is the preferred way.
  2. The other way is to find the node using an SQL statement. The field text represents the name of the node:
    SELECT * FROM umbracoNode WHERE text = 'nodename'
    To get all nodes where the name starts with the word CMS use the LIKE keyword combined with the wildcard character %.
    SELECT * FROM umbracoNode WHERE text LIKE 'CMS%'

Set the creation date

UPDATE umbracoNode
SET createDate = '20080430 18:00' -- see side note
WHERE id = 1111 -- id as evaluated before

This statement changes the creation date of the node but does not affect the rendering of this node. That's because Umbraco renders nodes using an internal XML structure which is generated while publishing a node.

Publish the Node

Republish the node to ensure that the XML structure is generated.
This task could also be done via an SQL statement, but I prefer using the built in functionality of the CMS.

The node now is rendered as expected.

Side notes

  • Using the ISO format for the date value ensures that the Microsoft SQL server correctly handles the value independent of the culture of the server.
    The ISO format is yyyymmdd hh:mm
  • Don't forget to use the owner of your db in the SQL statement
    e.g. SELECT * FROM owner.umbracoNode


1 Kommentare für “How to change the creation date of an Umbraco CMS node”

  1. Immo
    Freitag, 11. Dezember 2009 14:38

    Thanks a lot Christoph for sharing this solution. I know it is evil to do so, and Niels dislike it, but sometime the evil creates good. In my case to bring the blog Christmas calendar 2009 into correct order :) Keep up your good work, Immo

Leave a comment


Not shown. Will only display your Gravatar picture from http://www.gravatar.com/


(optional - remember http://)


Enter the characters from the image. (used to avoid spam posts)