Reference Guide > TDV Built-in Functions for XQuery > formatTimestampSequence
 
formatTimestampSequence
This function formats a sequence of timestamps as a comma-separated list of SQL literals.
Syntax
composite:formatTimestampSequence ($values as node()*)
Example
declare variable $values := <a><b>2012-01-01 00:00:00</b><b>2012-12-31 23:59:59</b></a>;
<result>{composite:formatTimestampSequence ($values//b)}</result>
Result
The output is of the form xs:string:
<result>'2012-01-01 00:00:00','2012-12-31 23:59:59'</result>