MarkLogic Server 11.0 Product Documentation
xdmp:strftime

xdmp:strftime(
   $format as xs:string,
   $value as xs:dateTime
) as xs: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:format-dateTime .

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:current-dateTime())
=> Thu, 06 Nov 2014 14:08:37
Powered by MarkLogic Server | Terms of Use | Privacy Policy