Is it possible to set the createdate to be a specific day using
Document doc = Document.MakeNew("My new document", dt, author, 1018);
Basically I am importing some data and need the create date to reflect the original/previous create date, so that the date folders are created correctly.
Create Document With Specific Create Date?
Is it possible to set the createdate to be a specific day using
Basically I am importing some data and need the create date to reflect the original/previous create date, so that the date folders are created correctly.
Hi Lee,
Yes, you should be able to set the CreateDate property, i.e.
Cheers, Lee.
Yes, that's possible.
doc.CreateDateTime = DateTime.Parse(yourdatetime);
HTH,
Peter
Ok cool, I'm going to give it a go now :) I shall reward you some more karma if it works ;)
Cheers bud
Sorry, Peter is correct, the property is "CreateDateTime" ... ignore my typo! (I was doing it off the top of my head) ;-)
Cheers, Lee.
Bringing 3 year old thread to ask same question for the new v6 API.
Creating content node with ContentService, setting the CreateDate property and publishing it seems to reset the CreateDate.
Here's the code:
While debugging node.CreateDate is set as it should, but after publishing node creation date is reseted.
Any ideas how to make this work with v6 API?
EDIT:
It seems that CreateDate is resetted on first save and publish, you need to set date after initial save & publish and do that one more time.
Working code:
is working on a reply...