mirror of
https://gitee.com/dotnetchina/MiniExcel.git
synced 2024-11-29 18:38:08 +08:00
Merge pull request #623 from jiaguangli/master
add dateTime nullable support
This commit is contained in:
commit
ecc049765d
@ -122,6 +122,8 @@
|
||||
newValue = _v2;
|
||||
else if (double.TryParse(vs, NumberStyles.None, CultureInfo.InvariantCulture, out var _d))
|
||||
newValue = DateTimeHelper.FromOADate(_d);
|
||||
else if (pInfo.Nullable && string.IsNullOrWhiteSpace(vs))
|
||||
newValue = null;
|
||||
else
|
||||
throw new InvalidCastException($"{vs} can't cast to datetime");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user