The code that I am using to update the property is:
itemToUpdateAsAdmin.Properties["dateEditingBegan"] =
Microsoft.SharePoint.Utilities.SPUtility.CreateISO8601DateTimeFromSystemDateTime(DateTime.Now);
itemToUpdateAsAdmin.UpdateOverwriteVersion();
Most of the time, the update works fine. On some files though, I get the
following error when it tries to update the datetime field:
"Specified data type does not match the current data type of the property"
I guess I have a number of questions around this which I need answers to:
Why does this work for some files and not for others?
How do I get it to work for all files (considering that they are all the
same content type, so the column should always be the same datatype)?
How do I find out the data type that Sharepoint is expecting (clearly it is
not the datatype that is defined in the content type)?
Any help on this would be greatly appreciated!
Thanks in advance!