From 6a93552ffd1044408405080e370760fce3d3f4fd Mon Sep 17 00:00:00 2001 From: skx <610262374@qq.com> Date: Thu, 4 Feb 2021 18:46:30 +0800 Subject: [PATCH] Update datediff --- .../SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs b/Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs index d555e08ed..13b88e7a4 100644 --- a/Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs +++ b/Src/Asp.Net/SqlSugar/ExpressionsToSql/DbMethods/DefaultDbMethod.cs @@ -461,7 +461,7 @@ namespace SqlSugar var parameter = model.Args[0]; var parameter2 = model.Args[1]; var parameter3 = model.Args[2]; - return string.Format(" DATEDIFF({0},{1},{2}) ", parameter.MemberName, parameter2.MemberName, parameter3.MemberName); ; + return string.Format(" DATEDIFF({0},{1},{2}) ", parameter.MemberValue?.ToString().ToSqlFilter(), parameter2.MemberName, parameter3.MemberName); ; } } }