Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Peter S 169 posts 587 karma points
    Sep 18, 2014 @ 13:37
    Peter S

    Can I change created date?

    We are moving a non-Umbraco site to a new Umbraco site and we'de like to update the created date to match the created date from the original cms. Is this possible? Otherwise our entire news archive will be more or less wrong.

  • Jeavon Leopold 3020 posts 13305 karma points MVP 8x admin c-trib
    Sep 18, 2014 @ 13:59
    Jeavon Leopold

    Hi Peter,

    You can do this by executing a SQL statement


    update umbracoNode SET createDate = GETDATE() where id = 128345

    Updating with your own date and nodeid


  • Peter S 169 posts 587 karma points
    Sep 22, 2014 @ 10:00
    Peter S

    Thank you, Jeavon!

  • Robert J. Bullock 386 posts 405 karma points
    Apr 07, 2015 @ 16:42
    Robert J. Bullock

    It would be super useful if someone created a utility to do this from within Umbraco.


  • Nicholas Westby 2033 posts 7006 karma points c-trib
    Apr 07, 2015 @ 17:41
    Nicholas Westby

    I usually just create a different date/time property. The creation date on the node itself should reflect the true creation time of the node. You could create another property called something like "Release Date" to reflect the date of publication. One could even use a content saved handler (see ) to auto-fill this property (but CMS users could still edit it).

  • David Podmore 15 posts 73 karma points
    May 29, 2015 @ 12:26
    David Podmore

    Hi Nicholas,

    Fairly new to this...

    I was looking for something just like this - and got halfway there myself. I have a custom property "Date Override" on my News Article doctype.

    At the moment I create a variable in my view that uses that property if its available (and createDate if not). I'd love to use the service handler to update "Date Override" but it's a little beyond my knowledge at the moment and I really don't know what to do. Can you please help??

    Thanks, David.

  • Nicholas Westby 2033 posts 7006 karma points c-trib
    May 30, 2015 @ 08:33
    Nicholas Westby


    Basically, you'll create a class that looks something like this:

    namespace ClassLibrary1
        using System;
        using System.Linq;
        using Umbraco.Core;
        using Umbraco.Core.Events;
        using Umbraco.Core.Models;
        using Umbraco.Core.Services;
        public class Class1 : ApplicationEventHandler
            protected override void ApplicationStarted(
                UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
                ContentService.Saving += ContentService_Saving;
                base.ApplicationStarted(umbracoApplication, applicationContext);
            void ContentService_Saving(IContentService sender, SaveEventArgs<IContent> e)
                var nodes = e.SavedEntities
                    .Where(x => "NewsArticle".InvariantEquals(x.ContentType.Alias));
                foreach (var node in nodes)
                    var date = node.GetValue<DateTime?>("dateOverride");
                    if (!date.HasValue)
                        node.SetValue("dateOverride", DateTime.Now);

    Most of that code comes from the link in my previous post. Note that I haven't tested it, but the basic ideas are:

    • Implement ApplicationEventHandler (gives you access to Umbraco events like ApplicationStarted).
    • Attach an event handler for when the content nodes are being saved.
    • If any of the content nodes are news articles that have a null value for their dateOverride property, default it to the current date.
  • Shada 55 posts 137 karma points
    Oct 07, 2015 @ 05:47

    I changed a createDate in the umbracoNode table. But when I try to get a date of creation, I can still get the old date.


    But when I look this content node through umbraco cms I see new created date.

    I tried to restart the server and delete umbraco.config, but it did not help.

  • Cory Colt 34 posts 129 karma points
    May 31, 2016 @ 16:38
    Cory Colt

    Did you ever get an answer to this? I'm experiencing the same problem as this. I've updated the date in the db, but on the UI it's still showing the old date.

  • Thomas Myrvang 1 post 72 karma points
    Feb 22, 2018 @ 11:57
    Thomas Myrvang

    Just in case someone is still wondering about this. After changing the date in the database, you need to republish the pages in the umbraco backend for the change to be visible.

Please Sign in or register to post replies

Write your reply to: