The field of the split-table supports DateoffsetTime

This commit is contained in:
sunkaixuan 2023-12-25 18:53:50 +08:00
parent 566b3a71b5
commit a20833db5e

View File

@ -74,6 +74,10 @@ namespace SqlSugar
{ {
return db.GetDate(); return db.GetDate();
} }
else if (value is DateTimeOffset)
{
return ((DateTimeOffset)value).DateTime;
}
else if (UtilMethods.GetUnderType(value.GetType()) != UtilConstants.DateType) else if (UtilMethods.GetUnderType(value.GetType()) != UtilConstants.DateType)
{ {
throw new Exception($"DateSplitTableService Split column {splitColumn.PropertyName} not DateTime " + splitType.ToString()); throw new Exception($"DateSplitTableService Split column {splitColumn.PropertyName} not DateTime " + splitType.ToString());