Entering Historic dates

Hi, I have setup my new EpiServer CMS and we are now poritng data from an old system into the new. We have notices which were posted in the past and so when we put them into EPiServer they need to be marked with historic creation date. Is this possible to do? thanks Arthur
May 22, 2007 17:36
Hi Arthur! Yes, you can programmatically set any creation date you want. You have to do it through PageData.Property["PageCreated"] however, as the PageData.Created property is defined as "Get" only. For example: PageData pageData = Global.EPDataFactory.GetDefaultPageData( new PageReference(3), 3); pageData.PageName = "A new historic page"; pageData.Property["PageCreated"].Value = DateTime.Now.Subtract(new TimeSpan(7,0,0,0)); Global.EPDataFactory.Save(pageData, SaveAction.Publish|SaveAction.Save); Best regards, Johan Olofsson EPiServer AB
May 23, 2007 10:50
Brilliant thanks for that
May 24, 2007 11:25
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.