Basic Syntax CrystalClear Syntax Before Reading Records

DateTo2000( Date, Number )


Use this function if the database you use delivers only a two digit date based on some "base date". The number argument should be the base date that the database uses for its internal year calulations (see the database documentation).

The function converts a date into a 4 digit date according to a number which should be in the range [0,..,99]. The date argument can be a 2 or 4 digit date, however, only the last two digits "xy" are significant. If the value of the last two digits "xy" (i.e., the last two digits interpreted as an integer) are smaller or equal to Number, then the date returned is "20xy"; otherwise the date returned is "19xy".

Usage:

DateTo2000( Date, Number )

Return:

Year 2000 Date

Example:

DateTo2000(CDate(1992,12,12), 99)
-> 2092/12/12

See also:


i-net software strives to provide accurate product documentation. Please give us your feedback using the form below.
NOTE: This form is for documentation feedback only. For technical assistance, please send an email to crystalclear@inetsoftware.de.

This page is: very poor very good
Comment: