fix:修复达梦数据库上时间相减永远输出为0的问题

This commit is contained in:
xieyidong
2025-02-07 15:08:12 +08:00
parent 8d21ec7a62
commit 65bf4dbbdb

View File

@@ -435,7 +435,8 @@ namespace FreeSql.Dameng
case "Subtract":
switch ((exp.Arguments[0].Type.IsNullableType() ? exp.Arguments[0].Type.GetGenericArguments().FirstOrDefault() : exp.Arguments[0].Type).FullName)
{
case "System.DateTime": return $"((cast({left} as timestamp with time zone)-{args1})*{24 * 60 * 60})";
//case "System.DateTime": return $"((cast({left} as timestamp with time zone)-{args1})*{24 * 60 * 60})";
case "System.DateTime": return $"DATEDIFF(Second, {args1}, {left})";
}
break;
case "Equals": return $"({left} = {args1})";