当我插入这些值
09/30/2013 05:04:56.599
09/30/2013 05:04:56.599
09/30/2013 05:04:56.599
09/30/2013 05:04:57.082
在 SqlServer 数据库中,毫秒值以一种奇怪的方式变化
2013-09-30 05:04:56.600
2013-09-30 05:04:56.600
2013-09-30 05:04:56.600
2013-09-30 05:04:57.083
怎么了 ?
编辑:相关代码:
com = new SqlCommand();
com.Connection = con;
com.CommandText = @"INSERT INTO [AuthSourceTimings]
([FileName]
,[JobID]
,[JobCreationTime]
,[JobSendTime]
,[JobAckTime]
,[JobDoneTime])
VALUES
(@FileName
,@JobID
,@JobCreationTime
,@JobSendTime
,@JobAckTime
,@JobDoneTime)
";
com.Parameters.AddWithValue("@FileName", fileName);
com.Parameters.AddWithValue("@JobID", t.JobID);
com.Parameters.AddWithValue("@JobCreationTime", t.JobCreationTime == DateTime.MinValue ? (object)DBNull.Value : (object)t.JobCreationTime);
com.Parameters.AddWithValue("@JobSendTime", t.JobSendTime == DateTime.MinValue ? (object)DBNull.Value : (object)t.JobSendTime);
com.Parameters.AddWithValue("@JobAckTime", t.JobAcknowledgementTime == DateTime.MinValue ? (object)DBNull.Value : (object)t.JobAcknowledgementTime);
com.Parameters.AddWithValue("@JobDoneTime", t.JobCompletionTime == DateTime.MinValue ? (object)DBNull.Value : (object)t.JobCompletionTime);
com.ExecuteNonQuery();