This project has moved and is read-only. For the latest updates, please go here.

datetime format issue

Apr 11, 2014 at 2:49 AM
I've got datetime format issue in my APP. see below sample code,

sheet.Cells[1, 1].Value = DateTime.Parse("1/1/1900 12:00:00 AM");
sheet.Column(1).Style.Numberformat.Format = "m/d/yyyy";

the cell shows 1/2/1900 instead of 1/1/1900.

Is it possible to fix it
Apr 11, 2014 at 2:59 AM
The issue occur only when the year field is 1900. if the year is less than 1900, the excel even could not show it correctly.
Apr 29, 2014 at 9:45 PM
Please see this article. It explains why there is the issue.