home contribute faq download

FunctX XSLT Functions


Format a date/time



The fn:format-dateTime function formats $value as a string using the picture string specified by $picture, the calendar specified by the $calendar argument, the language specified by the $language argument, and the country specified by the $country argument. The syntax of the picture string is described in section 16.5.1 of the XSLT 2.0 recommendation. Although the last three arguments are optional, if you specify one you must specify all three (but you can pass the empty sequence.) Note: this is an XSLT-only function; it is not available in XQuery or XPath.

Arguments and Return Type

$value xs:dateTime?
$picture xs:string
$language xs:string?
$calendar xs:string?
$country xs:string?
return value xs:string?


XSLT ExampleResults
See the example from the XSLT 2.0 recommendation.

See Also

fn:format-dateFormat a date
fn:format-timeFormat a time
functx:day-of-week-name-enThe name of the day of the week, from a date, in English
functx:day-of-week-abbrev-enThe abbreviated day of the week, from a date, in English
functx:month-name-enThe month of a date as a word (January, February, etc.)
functx:month-abbrev-enThe month of a date as an abbreviated word (Jan, Feb, etc.)


Published OnLast UpdatedContributor(s)
2007-03-172007-03-17W3C, XSLT 2.0, http://www.w3.org/TR/xslt20/
Datypic XSLT Services

Recommended Reading: