Skip to content

Commit 97265c1

Browse files
authored
support formatted DateTimeOffset convertion (mini-software#431)
1 parent b01e28c commit 97265c1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/MiniExcel/Utils/TypeHelper.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ public static bool IsNumericType(Type type, bool isNullableUnderlyingType = fals
9898
{
9999
newValue = _v;
100100
}
101+
else if(DateTimeOffset.TryParseExact(vs, pInfo.ExcelFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out var _v))
102+
{
103+
newValue = _v;
104+
}
101105
}
102106
else if (DateTime.TryParse(vs, _config.Culture, DateTimeStyles.None, out var _v))
103107
newValue = _v;

0 commit comments

Comments
 (0)