Function Dates Times Class

DateTo3CharString

"Date To Three Character String" Converts the date portion of a date/time value into a three-character string. The resolution is one day. The range is one decade. This string is suitable for use as the prefix or extension for a file name.

Signature (Visual Basic / VBA)

Public Function DateTo3CharString( _
    ByVal vDate As Variant _
    ) As Variant

Code Examples

    DateTo3CharString(#2/13/92#) = "2BD"
    DateTo3CharString(#2/14/92#) = "2BE"
    DateTo3CharString(#5/30/94#) = "4EU"
    DateTo3CharString(#5/30/84#) = "4EU"
    1) the last digit of the year (0..9)
    2) the month represented by a letter (A..L)
    3) the day represented by an alphanumeric (1..9, A..V)

Parameters

Parameter Description
vDate The date which is returned as a three-character string. Function returns Null if vDate is Null or cannot be fixed up to a Date.

Return Value

The return value is composed of: