DATE

DATE returns the date string in yy-mm-dd or yyyy-mm-dd format for a given serial number.

This function is valid in both rules and TurboIntegrator processes.

Syntax

DATE(SerialNumber, ReturnFourDigitYear)

Argument

Description

SerialNumber

A date expressed in serial format.

ReturnFourDigitYear

An optional Boolean argument that determines whether the DATE function returns a string using two- or four-digit notation for the year.

If ReturnFourDigitYear is true, the function returns date falling within the range of Jan. 1, 1960 and Dec. 31, 9999, using four-digit notation for the year. Serial date 0 corresponds to Jan. 1, 1960 and serial date 2936549 corresponds to Dec. 31, 9999.

If ReturnFourDigitYear is false, or if this optional argument is omitted from the DATE function, the function returns a date falling within the range Jan. 1, 1960 and Dec. 31, 2059, using two-digit notation for the year. Serial date 0 corresponds to Jan 1, 1960 and serial date 36524 corresponds to Dec. 31, 2059.

If ReturnFourDigitYear is false or is omitted and you specify a serial date greater than 36524, the serial date used by the function is determined by the formula n - 36525. For example, if you specify a serial date of 36530, then 36530 - 36525 = 5. In this case, DATE uses 5 as the serial date and returns the date Jan. 6, 1960.

Example

DATE(13947) returns 98-03-09.

DATE(13947, 1) returns 1998-03-09.