This entry covers two related functions: year-from-dateTime() and year-from-date() .
These functions extract the year from an xs:date or xs:dateTime value, as an integer. In the case of BC dates, the integer may be negative.
Argument | Data Type | Meaning |
---|---|---|
input | xs:dateTime? or xs:date? | The value from which the year component is to be extracted. The data type of the supplied argument must correspond to the data type implied by the function name |
Result | xs:integer | The year component of the date |