It is possible to do this with some event handler code. The recordImporting event is the one you need to use since you can modify the values before the get assigned to the property.
Below some code (haven't tested this on a site but should work).
publicclassSetUnpublish : ApplicationBase
{
public SetUnpublish()
{
ContentImport.RecordImporting += newContentImport.RecordImportingEventHandler(ContentImport_RecordImporting);
}
void ContentImport_RecordImporting(object sender, RecordImportingEventArgs e)
{
//Add an extra day, you might check if teh value is null or not
((DateTime)e.Items["ClosingDate"]).AddDays(1);
}
}
Altering date at import
Is there a way to add time to a date being imported?
I have been using a 'Closing date' value as the 'Unpublish' date, effectively removing out of date content from a scheduled import.
However, the node still needs to be available for that day, so the unpublish date should be Closing date + 1
Hi Tony,
It is possible to do this with some event handler code. The recordImporting event is the one you need to use since you can modify the values before the get assigned to the property.
Below some code (haven't tested this on a site but should work).
Hope this helps you,
Richard
Hmmm
OK, added
Seems happier. Now to test the scheduling...
is working on a reply...