Inserting current DateTime into Audit table

后端 未结 2 1083
南方客
南方客 2020-12-21 10:06

I am in the process of implementing an audit log to record a brief description of changes to the database. My audits table consists of an autonumber PK, emp

2条回答
  •  生来不讨喜
    2020-12-21 10:23

    try to format datetime like this:

    protected DateTime GetDateWithoutMilliseconds(DateTime d)
        {
            return new DateTime(d.Year, d.Month, d.Day, d.Hour, d.Minute, d.Second);
        }
    

提交回复
热议问题