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()); }