'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)
public static bool TryToDate( double value, bool isDate1904, bool excelDateTimeCompatible, out DateTime 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.