entry creation common process for both code and datetime occurrences