Browse Source

Update oracle

pull/14/MERGE
sunkaixuan 3 years ago
parent
commit
028601ca40
  1. 4
      Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs

4
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)
{

Loading…
Cancel
Save