This function allows to get the month of the date.

1 date.month

<date.month>
    <var /> ?
</date.month>

Remark

A variable of Timestamp type is declared and asigned with the value 10-12-2004 21:30:10 GMT (Greenwich Mean Time). With the operator <date.month> only the month of the date which is 2 (February) is obtained.

Example

Get the number of month of the date.

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

Returns:

Copy
2