Fix UDF date formatting

Fixes #1046
As I recall from talking with Adam, a UDF's audits are deleted when the UDF is deleted.