Hi Everyone, I had to fight against this issue, basically I had to retrieve a date from an Excel file and manipulate it as a DateTime. Easier said than done, the content of the cell was an unfriendly double, and I had no Idea on how to convert it. That’s the code that is doing the trick:
1 |
DateTime dt = DateTime.FromOADate((double)value); |
This is the article on Microsoft Knowledge base