To replace datetime values and dateranges in a DateTime field, create a string containing the new values, then use replaceItemValue to pass the string into the field.