# saxon:format-dateTime()

format-dateTime( $value as xs:dateTime?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $country as xs:string?) as xs:string?

format-dateTime($value as xs:dateTime?, $picture as xs:string) as xs:string?

format-date( $value as xs:date?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $country as xs:string?) as xs:string?

format-date($value as xs:date?, $picture as xs:string) as xs:string?

format-time( $value as xs:time?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $country as xs:string?) as xs:string?

format-time($value as xs:time?, $picture as xs:string) as xs:string?

These functions are identical to the XSLT functions of the same name, but are made available in the Saxon namespace for the benefit of XQuery users. For full details, see the current draft of the XSLT 2.0 specification.

For example, the call `saxon:format-date(current-date(), '[D1o] [MNn], [Y0001]')` might produce the output `3rd September, 2004`.

These functions (in the Saxon namespace) are available in Saxon-SA only.

Expand | Up Next