xdmp.strftime

xdmp.strftime(
   format as String,
   value as Date
) as String

Summary

Formats a dateTime value using POSIX strftime. This function uses the POSIX strftime system call in the way it is implemented on each platform. For other XQuery functions that have more functionality (for example, for things like timezones), use one or more if the various XQuery or XSLT standard functions such as fn.formatDateTime.

Parameters
format The strftime format string.
value The dateTime value.

Usage Notes

The supported format strings differ for different platforms. For the supported format strings for Windows, see the following link:

http://msdn2.microsoft.com/en-us/library/fe06s4ak(VS.80).aspx

For the supported format strings for Linux, see the following link:

http://linux.about.com/library/cmd/blcmdl3_strftime.htm

Example

xdmp.strftime("%a, %d %b %Y %H:%M:%S", fn.currentDateTime());
=> Thu, 06 Nov 2014 14:08:37
Powered by MarkLogic Server | Terms of Use | Privacy Policy