fn:month-from-dateTime function
The fn:month-from-dateTime function returns the month component of an xs:dateTime value that is in its localized form.
Syntax
- dateTime-value
- The dateTime value from which the month component is to be extracted.
dateTime-value is of type xs:dateTime, or is an empty sequence.
Returned value
If dateTime-value is of type xs:dateTime, the returned value is of type xs:integer, and the value is in the range 1–12, inclusive. The value is the month component of dateTime-value.
If dateTime-value is an empty sequence, the returned value is an empty sequence.
Example
The following function returns the month component of the dateTime value for October 31, 2009 at 8:15 a.m. in the UTC-8 time zone.
fn:month-from-dateTime(xs:dateTime("2009-10-31T08:15:00-08:00"))
The returned value is 10.