| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== YEAR (return year of date) ====== | [[who return field name from group .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[yield allow event processing .htm|{{btn_next_n.gif|Next page}}]] | | || **YEAR(**//date//**)** {{blk2blue.jpg|blk2blue.jpg}} | **YEAR** | Returns the year. | | //date// | A numeric constant, variable, expression, or the label of a string variable declared with a date picture, containing a standard date. A variable declared with a date picture is automatically converted to a standard date intermediate value. | The **YEAR** procedure returns a four digit number for the year of a standard //date// (1801 to 9999). **Return Data Type:     **LONG **Example:** **IF YEAR(LastOrd) <; ****YEAR****(TODAY())   !If last order date not from this year** ** DO StartNewYear                   !start new year to date totals** **END** **See Also:** [[standard date.htm|Standard Date]] [[day return day of month .htm|DAY]] [[month return month of date .htm|MONTH]] [[today return system date .htm|TODAY]] [[date return standard date .htm|DATE]]