This function allows to obtain the year of a date.

1 date.year

<date.year>
    <var /> ?
</date.year>
Example

Get the number of the year of the date.

Copy
<xsql-script name='date_year_sample1'>
    <body>
        <set name='a' type='Timestamp'>10-02-2004 21:30:10 GMT</set>
        <println><date.year><a/></date.year></println>
    </body>
</xsql-script>

Returns:

Copy
2004