<-- Previous || Up || Next -->

C Date Ign Err Function
Convert Values Class

Public Function CDateIgnErr( _
    ByVal vValue As Variant _
    ) As Date

"Convert To Date Ignore Errors"
Attempt to convert vValue to a Date value.
Return vValue as a Date value if the conversion was successful.
Return the Date represented by the number 0 (zero) if vValue could not be converted to a Date.

Examples:
    CDateIgnErr(-1) = #12/29/1899#
    CDateIgnErr(0) = #12/30/1899#
    CDateIgnErr(1) = #12/31/1899#
    CDateIgnErr(1E300) = #12/30/1899#
    CDateIgnErr("1") = #12/31/1899#
    CDateIgnErr("0") = #12/30/1899#
    CDateIgnErr("Word") = #12/30/1899#
    CDateIgnErr("1/1/2001") = #1/1/2001#
    CDateIgnErr(#1/1/2001#) = #1/1/2001#
    CDateIgnErr("Jan 10 1965") = #1/10/1965#
See also:
    CanBeDate Function
    CDate Function (Visual Basic)
vValue: The value which will be converted to Date and returned (if conversion is possible). Conversion is not possible if vValue is Null, an Error, an Object, a non-numeric String, or a numeric value out of the range allowed for this data type.
Note: This function is the same as CVDateIgnErr, except this one uses CDate to perform the conversion and that one uses CVDate to perform the conversion.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.