public static DateTime ConvertExcelNumberToDateTime( double num, bool use1904DateSystem )
Public Shared Function ConvertExcelNumberToDateTime ( num As Double, use1904DateSystem As Boolean ) As DateTime
Excel file format doesn't have a separate data type for date and time. DateTime value is stored as IEEE number encoded in a special way. When reading Excel file, CellStyle.NumberFormat is examined and if it matches some of date/time number formats cell value is interpreted as DateTime.
However, if some non-standard date/time number format is used, cell value will not be recognized as DateTime but as ordinary number. In such cases (when you know that specific cell holds DateTime value but you get a number when reading Excel file) use this method to convert IEEE number to DateTime structure.