YEAR()

Converts the year portion of a date into a numeric value

Syntax

YEAR(<cDate>) --> nYear

Arguments

<dDate> Any valid date expression

Returns

<nYear> The year portion of the date.

Description

This function returns the numeric value for the year in <dDate>. This value will always be a four-digit number and is not affected by the setting of the SET CENTURY and SET DATE commands. Addition ally, an empty date expression passed to this function will yield a zero value.

Examples
      ? Year(date())
      ? year(CTOD("01/25/3251"))
Status

Ready

Compliance

This function is Ca-Clipper compliant

Platforms

All

Files

Library is rtl

See Also