# xf:get-month-from-dateTime

Extracts the month from $dateTime-var.

If the value of $dateTime-var is the empty sequence, the empty sequence is returned. The empty sequence is a sequence containing zero items (), which is similar to null in SQL.

### Signatures

xf:get-month-from-dateTime(xs:dateTime? $dateTime-var) —> xs:integer?

### Arguments

Data Type | Argument | Description
--- | --- | ---
xs:dateTime? | $dateTime-var | Contains a representation of the date and time.

### Returns

Returns the month as an integer from $dateTime-var.

### Examples

#### Simple

When you invoke the following query:

    <month>{xf:get-month-from-dateTime("2002-08-30T22:21:01")}</month>

The preceding query generates the following result:

    <month>8</month>

Related Topics

W3C get-month-from-dateTime function description.

W3C dateTime data type description.