SpreadsheetGear 2017
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.
Syntax
'Declaration
 
Function NumberToDateTime( _
   ByVal number As System.Double _
) As System.Date
'Usage
 
Dim instance As IWorkbook
Dim number As System.Double
Dim value As System.Date
 
value = instance.NumberToDateTime(number)
System.DateTime NumberToDateTime( 
   System.double number
)
function NumberToDateTime( 
    number: System.Double
): System.DateTime; 
function NumberToDateTime( 
   number : System.double
) : System.DateTime;
System.DateTime NumberToDateTime( 
   System.double number
) 
System.DateTime NumberToDateTime( 
   System.double number
) 

Parameters

number
The date-time serial number to convert.

Return Value

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

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

This method is safe to use from custom functions.

Requirements

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

Reference

IWorkbook Interface
IWorkbook Members
DateTimeToNumber Method
Date1904 Property