修改导表
parent
90412c5817
commit
281b5d2177
|
@ -77,7 +77,8 @@ public static class ExcelExportHelper
|
||||||
//处理集合里面时间类型,根据当前语言将时间转变为字符串
|
//处理集合里面时间类型,根据当前语言将时间转变为字符串
|
||||||
foreach (var itemValuePair in itemDic)
|
foreach (var itemValuePair in itemDic)
|
||||||
{
|
{
|
||||||
if (DateTime.TryParse(itemValuePair.Value?.ToString(), out DateTime result))
|
// 临床数据 1,1 会变成2024-01-01
|
||||||
|
if (itemValuePair.Value?.ToString().Length > 4 && DateTime.TryParse(itemValuePair.Value?.ToString(), out DateTime result))
|
||||||
{
|
{
|
||||||
itemDic[itemValuePair.Key] = ExportExcelConverterDate.DateTimeInternationalToString(result);
|
itemDic[itemValuePair.Key] = ExportExcelConverterDate.DateTimeInternationalToString(result);
|
||||||
}
|
}
|
||||||
|
@ -337,7 +338,7 @@ public static class ExcelExportHelper
|
||||||
//处理集合里面时间类型,根据当前语言将时间转变为字符串
|
//处理集合里面时间类型,根据当前语言将时间转变为字符串
|
||||||
foreach (var itemValuePair in itemDic)
|
foreach (var itemValuePair in itemDic)
|
||||||
{
|
{
|
||||||
if (DateTime.TryParse(itemValuePair.Value?.ToString(), out DateTime result))
|
if (itemValuePair.Value?.ToString().Length > 4 && DateTime.TryParse(itemValuePair.Value?.ToString(), out DateTime result))
|
||||||
{
|
{
|
||||||
itemDic[itemValuePair.Key] = ExportExcelConverterDate.DateTimeInternationalToString(result);
|
itemDic[itemValuePair.Key] = ExportExcelConverterDate.DateTimeInternationalToString(result);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue