DateValue function (LotusScript® Language)

Returns the date value represented by a string expression.

Syntax

DateValue ( stringExpr )

Elements

stringExpr

A string expression representing a date/time. stringExpr must be a String in a valid date/time format or else a Variant containing either a date/time value or a string value in date/time format. If you omit the year in stringExpr, DateValue uses the year in the current system date.

If stringExpr is a string whose date part contains only numbers and valid date separators, the operating system's international Short Date format determines the order in which the numbers are interpreted as month, day, and year values.

If you specify a 2-digit year designation (yy) in Notes® or Domino®, LotusScript® interprets 50 through 99 as the years 1950 through 1999 and 00 through 49 as the years 2000 through 2049. For example, 88 and 1988 are equivalent year designations and 12 and 2012 are equivalent year designations.

If you specify a 2-digit year designation in SmartSuite®, LotusScript® interprets the years differently. For information on how each SmartSuite® product interprets 2-digit year designations, see the online help entry entitled Year 2000. This entry appears on the Help menu of each SmartSuite® product.

Return value

DateValue returns the date value represented by stringExpr.

The data type of the return value is a Variant of DataType 7 (Date/Time).

Usage

If the stringExpr argument specifies a time of day, DateValue validates the time, but omits it from the return value.

Example