Basic Syntax CrystalClear Syntax Before Reading Records

DTSTo2000( DateTimeString, 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 used by the database for its internal year calulations (see the database documentation).

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

Usage:

DTSTo2000( DateTimeString, Number )

Return:

Year 2000 Date

Example:

DateTo2000(ToText(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: