From 028601ca4000e0a026385316a1388afd0fbf11c8 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sun, 27 Mar 2022 00:34:33 +0800 Subject: [PATCH] Update oracle --- .../Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs b/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs index 27a20a7bb..a927e9b45 100644 --- a/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs +++ b/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs @@ -121,7 +121,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()) { @@ -139,7 +139,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) {