I need to retrieve an excel column of date.
My first column 'A' values are formatted like this6/20/2016 10:44
. I have no problem of retrieving column 'A' with this format using
using DocumentFormat.OpenXml;
double d = double.Parse(theCell.InnerText);
DateTime conv = DateTime.FromOADate(d).Date;
My second column 'B' is formatted as 6/20/2016.
With no time, just date.
but my problem is when i tried this code below:
using DocumentFormat.OpenXml;
double d = double.Parse(theCell.InnerText);
DateTime conv = DateTime.FromOADate(d).Date;
theCell.InnerText value is 1455
I am having a different value. the value changes into 12/25/1903 12:00:00 AM
How can I retrieve excel values with this kind of date format 6/30/2016
?