mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-14 20:30:56 +08:00
fix:修复达梦数据库上时间相减永远输出为0的问题
This commit is contained in:
@@ -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})";
|
||||
|
||||
Reference in New Issue
Block a user