Version

ExcelDateToDateTime(Workbook,Double,Boolean) Method

Converts Excel's numerical representation of a date to a DateTime.
Syntax
'Declaration
 
Public Overloads Shared Function ExcelDateToDateTime( _
   ByVal workbook As Workbook, _
   ByVal excelDate As Double, _
   ByVal shouldCorrect1900Dates As Boolean _
) As Nullable(Of Date)
public static Nullable<DateTime> ExcelDateToDateTime( 
   Workbook workbook,
   double excelDate,
   bool shouldCorrect1900Dates
)

Parameters

workbook
excelDate
The Microsoft Excel date format which should be converted to a DateTime.
shouldCorrect1900Dates
When using the 1900 date system in Excel, dates before 3/1/1900 must be corrected, because Excel incorrectly assumes 1900 is a leap year. Pass False to disable this correction.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also