Spread WinForms 15
GrapeCity.CalcEngine Assembly / GrapeCity.CalcEngine Namespace / CalcHelper Class / TryToDate Method
A double value indicates the date serial.
if set to true, the 1904 date system is using.
true if date time system is compatible with Excel; otherwise, false.
A System.DateTime value represents the corresponding date.


In This Topic
TryToDate Method
In This Topic
Converts date serial to System.DateTime value.
Syntax
'Declaration
 
Public Shared Function TryToDate( _
   ByVal value As Double, _
   ByVal isDate1904 As Boolean, _
   ByVal excelDateTimeCompatible As Boolean, _
   ByRef date As Date _
) As Boolean
 
'Usage
 
Dim value As Double
Dim isDate1904 As Boolean
Dim excelDateTimeCompatible As Boolean
Dim date As Date
Dim value As Boolean
 
value = CalcHelper.TryToDate(value, isDate1904, excelDateTimeCompatible, date)

Parameters

value
A double value indicates the date serial.
isDate1904
if set to true, the 1904 date system is using.
excelDateTimeCompatible
true if date time system is compatible with Excel; otherwise, false.
date
A System.DateTime value represents the corresponding date.

Return Value

true if the date serial can convert to System.DateTime value; otherwise, false.
See Also