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.
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 https://our.umbraco.org/documentation/Reference/Events-v6/ContentService-Events ) to auto-fill this property (but CMS users could still edit it).
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??
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.
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.
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.
Hi Peter,
You can do this by executing a SQL statement
e.g.
Updating with your own date and nodeid
Jeavon
Thank you, Jeavon!
It would be super useful if someone created a utility to do this from within Umbraco.
Robert
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 https://our.umbraco.org/documentation/Reference/Events-v6/ContentService-Events ) to auto-fill this property (but CMS users could still edit it).
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.
David,
Basically, you'll create a class that looks something like this:
Most of that code comes from the link in my previous post. Note that I haven't tested it, but the basic ideas are:
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.
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.
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.
is working on a reply...