1. Главная
  2. Функции XPath
  3. date:date-time()

date:date-time XPath

The date:date-time function returns the current date and time as a date/time string.


EXSLT Function Syntax

string date:date-time()

Описание и примеры

The date/time string that's returned must be a string in the format defined as the lexical representation of xs:dateTime in 3.2.7 dateTime of XML Schema Part 2: Datatypes.

The date/time format is basically CCYY-MM-DDThh:mm:ss, although implementers should consult XML Schema Part 2: Datatypes and ISO 8601 for details.

The date/time string format must include a time zone, either a Z to indicate Coordinated Universal Time or a + or - followed by the difference between the difference from UTC represented as hh:mm.


The following XSLT processors support date:date-time:

  • SAXON from Michael Kay (version 6.4.2)
  • Xalan-J from Apache (version 2.4.D1)
  • 4XSLT, from 4Suite. (version 0.12.0a3)
  • libxslt from Daniel Veillard et al. (version 1.0.19)

Implementations of date:date-time are available in the following languages: