Skip to content

Commit 818bf60

Browse files
committed
Require opt-in to date time on export
1 parent 241747b commit 818bf60

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Build/CommonAssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
//
1616
// You can specify all the values or you can default the Revision and Build Numbers
1717
// by using the '*' as shown below:
18-
[assembly: AssemblyVersion("1.8.6")]
19-
[assembly: AssemblyFileVersion("1.8.6")]
18+
[assembly: AssemblyVersion("1.8.7")]
19+
[assembly: AssemblyFileVersion("1.8.7")]
2020
//[assembly: AssemblyInformationalVersion("1.4.5-editlyalpha2")]

Griddly.Mvc/GriddlyExcelResult.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ public override void ExecuteResult(ControllerContext context)
5858

5959
if (renderedValue as DateTime? != null)
6060
{
61-
if (columns[x].Format == "d")
62-
cell.Style.Numberformat.Format = "mm/dd/yyyy";
63-
else
61+
if (columns[x].Format == "f" || columns[x].Format == "F"
62+
|| columns[x].Format == "g" || columns[x].Format == "G")
6463
cell.Style.Numberformat.Format = "mm/dd/yyyy hh:mm";
64+
else
65+
cell.Style.Numberformat.Format = "mm/dd/yyyy";
6566

6667
cell.Style.HorizontalAlignment = ExcelHorizontalAlignment.Right;
6768
}

0 commit comments

Comments
 (0)