Use deepclone, it has a parameter 'membersToSkip', fill that with "createdDate". You have to excluded all entities to prevent the deepclone functionality, unless your object has no associations.
The other option is to tweak clone and add 'membersToSkip'. Beware updates from the appstore.
public static Boolean cloneObject(IContext c, IMendixObject source,
IMendixObject target, Boolean withAssociations, String membersToSkip)
{
Map<String, ? extends IMendixObjectMember<?>> members = source.getMembers(c);
for(String key : members.keySet())
if (!membersToSkip.contains(key) ){
IMendixObjectMember<?> m = members.get(key);
if (m.isVirtual())
continue;
if (m instanceof MendixAutoNumber)
continue;
if (withAssociations || ((!(m instanceof MendixObjectReference) && !(m instanceof MendixObjectReferenceSet))))
target.setValue(c, key, m.getValue(c));
}
}
return true;
}