SpreadsheetGear 2023
NumberToDateTime Method (IWorkbook)

SpreadsheetGear Namespace > IWorkbook Interface : NumberToDateTime Method
The date-time serial number to convert.
Converts the specified date-time serial number to an instance of System.DateTime.
Function NumberToDateTime( _
   ByVal number As System.Double _
) As System.Date
Dim instance As IWorkbook
Dim number As System.Double
Dim value As System.Date
value = instance.NumberToDateTime(number)
System.DateTime NumberToDateTime( 
   System.double number


The date-time serial number to convert.

Return Value

An instance of System.DateTime initialized with the converted date-time serial number.

Dates and times are stored in worksheet cells as a date-time serial number.

This method is safe to use from custom functions.


Target Platforms: 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


IWorkbook Interface
IWorkbook Members
DateTimeToNumber Method
Date1904 Property