diff --git a/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/PostgreSQLProvider.cs b/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/PostgreSQLProvider.cs index 41ac202f6..8beecd478 100644 --- a/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/PostgreSQLProvider.cs +++ b/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/PostgreSQLProvider.cs @@ -153,6 +153,10 @@ namespace SqlSugar { sqlParameter.DbType = System.Data.DbType.AnsiString; } + else if (sqlParameter.Value is DateTime && sqlParameter.DbType == System.Data.DbType.AnsiString) + { + sqlParameter.DbType = System.Data.DbType.DateTime; + } ++index; } return result;