mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-16 21:19:34 +08:00
Update 达梦 time to TimeSpan
This commit is contained in:
parent
93b3cab269
commit
a8fd3dffb1
@ -610,6 +610,10 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
return (char)(bytes)[0];
|
return (char)(bytes)[0];
|
||||||
}
|
}
|
||||||
|
else if (value is DateTime && destinationType == typeof(TimeSpan))
|
||||||
|
{
|
||||||
|
value = Convert.ToDateTime(value).TimeOfDay;
|
||||||
|
}
|
||||||
var destinationConverter = TypeDescriptor.GetConverter(destinationType);
|
var destinationConverter = TypeDescriptor.GetConverter(destinationType);
|
||||||
if (destinationConverter != null && destinationConverter.CanConvertFrom(value.GetType()))
|
if (destinationConverter != null && destinationConverter.CanConvertFrom(value.GetType()))
|
||||||
return destinationConverter.ConvertFrom(null, culture, value);
|
return destinationConverter.ConvertFrom(null, culture, value);
|
||||||
|
Loading…
Reference in New Issue
Block a user