fn:day-from-date function

The fn:day-from-date function returns the day component of an xs:date value that is in its localized form.

Syntax

Read syntax diagramSkip visual syntax diagramfn:day-from-date( date-value)
date-value
The date value from which the day component is to be extracted.

date-value is of type xs:date, or is an empty sequence.

Returned value

If date-value is of type xs:date, the returned value is of type xs:integer, and the value is in the range 1–31, inclusive. The value is the day component of date-value.

If date-value is an empty sequence, the returned value is an empty sequence.

Example

The following function returns the day component of the date value for June 1, 2009.

fn:day-from-date(xs:date("2009-06-01"))

The returned value is 1.