diff --git a/SqlSugar/Abstract/SqlBuilderProvider/InsertBuilder.cs b/SqlSugar/Abstract/SqlBuilderProvider/InsertBuilder.cs index 6f1d70c0a..4ccc9a972 100644 --- a/SqlSugar/Abstract/SqlBuilderProvider/InsertBuilder.cs +++ b/SqlSugar/Abstract/SqlBuilderProvider/InsertBuilder.cs @@ -163,7 +163,7 @@ namespace SqlSugar { date = Convert.ToDateTime("1900-1-1"); } - return "'" + date.ToString("yyyy-MM-dd hh:mm:ss.fff") + "'"; + return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'"; } else if (type == PubConst.BoolType) { diff --git a/SqlSugar/Abstract/SqlBuilderProvider/UpdateBuilder.cs b/SqlSugar/Abstract/SqlBuilderProvider/UpdateBuilder.cs index 90ff60e2b..11374ea30 100644 --- a/SqlSugar/Abstract/SqlBuilderProvider/UpdateBuilder.cs +++ b/SqlSugar/Abstract/SqlBuilderProvider/UpdateBuilder.cs @@ -256,7 +256,7 @@ namespace SqlSugar if (date < Convert.ToDateTime("1900-1-1")) { date = Convert.ToDateTime("1900-1-1"); } - return "'" + date.ToString("yyyy-MM-dd hh:mm:ss.fff") + "'"; + return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'"; } else if (type == PubConst.BoolType) {