From 2e21371302abe9d78a8e8f2192e82963a0ae9458 Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Tue, 21 Dec 2021 18:14:31 +0800 Subject: [PATCH] Update date exp to sql --- .../ResolveItems/MethodCallExpressionResolve.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs b/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs index 63c9bde70..a079dfddf 100644 --- a/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs +++ b/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/MethodCallExpressionResolve.cs @@ -726,7 +726,7 @@ namespace SqlSugar case "ToTime": return this.Context.DbMehtods.ToTime(model); case "ToString": - if (model.Args.Count > 1 && model.Args.Last().MemberValue.ObjToString().IsContainsIn("-", "/", ":", "yy", "ms", "hh")) + if (model.Args.Count > 1 && model.Args.Last().MemberValue.ObjToString().ToLower().IsContainsIn("-", "/", ":","m","d","s", "y", "ms", "h","convert")) { return GeDateFormat(model.Args.Last().MemberValue.ObjToString(), model.Args.First().MemberName.ObjToString()); }