forked from ddrilling/AsbCloudServer
Смена формата даты в DrillTestReportDataDto
This commit is contained in:
parent
25138ec3ff
commit
62e30b0e8b
@ -21,6 +21,6 @@ namespace AsbCloudApp.Data.DrillTestReport
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Дата отчета
|
/// Дата отчета
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime Date { get; set; } = DateTime.Now;
|
public DateTimeOffset Date { get; set; } = DateTimeOffset.Now;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ namespace AsbCloudInfrastructure.Services.DrillTestReport
|
|||||||
well.Deposit ?? "-",
|
well.Deposit ?? "-",
|
||||||
well.Cluster ?? "-",
|
well.Cluster ?? "-",
|
||||||
well.Caption ?? "-"),
|
well.Caption ?? "-"),
|
||||||
Date = DateTime.Now,
|
Date = DateTimeOffset.Now,
|
||||||
};
|
};
|
||||||
|
|
||||||
var fileName = string.Format("Drill_test_{0}.xlsx", dto.TimeStampStart.ToString("dd.mm.yyyy_HH_MM_ss"));
|
var fileName = string.Format("Drill_test_{0}.xlsx", dto.TimeStampStart.ToString("dd.mm.yyyy_HH_MM_ss"));
|
||||||
|
@ -17,7 +17,7 @@ public static class XLExtentions
|
|||||||
|
|
||||||
public static IXLCell SetCellValue<T>(this IXLCell cell, T value, string? format = null)
|
public static IXLCell SetCellValue<T>(this IXLCell cell, T value, string? format = null)
|
||||||
{
|
{
|
||||||
if (typeof(T) == typeof(DateTime))
|
if (typeof(T) == typeof(DateTime) || typeof(T) == typeof(DateTimeOffset))
|
||||||
{
|
{
|
||||||
cell.Style.DateFormat.Format = format ?? "DD.MM.YYYY HH:MM:SS";
|
cell.Style.DateFormat.Format = format ?? "DD.MM.YYYY HH:MM:SS";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user