I'm trying to duplicate a SPFieldDateTime's value into another SPFieldDateTime in an event handler and I have to admit, I'm stumped. There are no obvious fields I can set in an SPFieldDatetime and the following doesn't change my field's value:
{
SPListItem task = (SPListItem) properties;
task[/* destination field's guid */] = task[/* source field's guid */];
}
The code seems to be able to retrieve the fields without error. Using either of the GUIDs in SPFieldDateTime time = (SPFieldDateTime)task.Fields[/* either GUID */];
executes without error and the debugger appears to have the right field: the proper values exist in the properties etc.
How do I set a SPFieldDateTime value?