Synchronization code

This commit is contained in:
sunkaixuan 2023-11-04 23:37:14 +08:00
parent 80e718695e
commit c336836320

View File

@ -86,7 +86,14 @@ namespace SqlSugar
{ {
date = UtilMethods.GetMinDate(this.Context.CurrentConnectionConfig); date = UtilMethods.GetMinDate(this.Context.CurrentConnectionConfig);
} }
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'"; if (this.Context.CurrentConnectionConfig?.MoreSettings?.DisableMillisecond == true)
{
return "to_date('" + date.ToString("yyyy-MM-dd HH:mm:ss") + "', 'YYYY-MM-DD HH24:MI:SS') ";
}
else
{
return "to_timestamp('" + date.ToString("yyyy-MM-dd HH:mm:ss.ffffff") + "', 'YYYY-MM-DD HH24:MI:SS.FF') ";
}
} }
else if (type.IsEnum()) else if (type.IsEnum())
{ {