Skip to main content

DateValue

DateValue Function

Calculates the sequential decimal number that represents a particular date represented by a text string. The sequential decimal number counts the days from January 1, 1900.

Syntax

DateValue(scalar DateString)

Arguments

ArgumentDescription
scalar DateStringDate to be converted to a decimal number; function accepts most standard date formats, including mm/dd/yy, mm-dd-yyyy, mmm dd, yyyy. The function differentiates between related formats (for example, mm-dd-yyyy and dd-mm-yyyy) on the basis of the current locale set for the machine where DPL is installed.

Examples:

DateValue('December 21, 2004')

Return the serial number representing of the specified date.