From f89a4972779ba1f3195fc08e2b376d61e0efd08c Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sun, 27 Mar 2022 00:36:27 +0800 Subject: [PATCH] Update oracle --- .../Realization/Oracle/SqlBuilder/OracleUpdateBuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleUpdateBuilder.cs b/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleUpdateBuilder.cs index 171e561b4..30c680307 100644 --- a/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleUpdateBuilder.cs +++ b/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleUpdateBuilder.cs @@ -57,7 +57,7 @@ namespace SqlSugar { date = Convert.ToDateTime("1900-1-1"); } - return "to_date('" + date.ToString("yyyy-MM-dd HH:mm:ss") + "', 'YYYY-MM-DD HH24:MI:SS') "; + return "to_timestamp('" + date.ToString("yyyy-MM-dd HH:mm:ss.ffffff") + "', 'YYYY-MM-DD HH24:MI:SS.FF') "; } else if (type.IsEnum()) { @@ -83,7 +83,7 @@ namespace SqlSugar else if (type == UtilConstants.DateTimeOffsetType) { var date = UtilMethods.ConvertFromDateTimeOffset((DateTimeOffset)value); - return "to_date('" + date.ToString("yyyy-MM-dd HH:mm:ss") + "', 'YYYY-MM-DD HH24:MI:SS') "; + return "to_timestamp('" + date.ToString("yyyy-MM-dd HH:mm:ss.ffffff") + "', 'YYYY-MM-DD HH24:MI:SS.FF') "; } else if (type == UtilConstants.StringType || type == UtilConstants.ObjType) {