Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Here is a transformation that does what you want</strong>:</p> <pre><code>&lt;xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; &lt;xsl:output omit-xml-declaration="yes" indent="yes"/&gt; &lt;xsl:variable name="vDateTime" as="xs:dateTime" select="xs:dateTime('2006-02-15T17:00:00+00:00')"/&gt; &lt;xsl:template match="/"&gt; &lt;xsl:sequence select= "adjust-dateTime-to-timezone($vDateTime, xs:dayTimeDuration('P0DT4H') )"/&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p><strong>When applied to any XML document (not used), the result is</strong>:</p> <pre><code>2006-02-15T21:00:00+04:00 </code></pre> <p><strong>And the complete solution is:</strong></p> <pre><code>&lt;xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; &lt;xsl:output omit-xml-declaration="yes" indent="yes"/&gt; &lt;xsl:variable name="vDateTime" as="xs:dateTime" select="xs:dateTime('2006-02-15T17:00:00+00:00')"/&gt; &lt;xsl:template match="/"&gt; &lt;xsl:variable name="vadjustedDateTime" select= "adjust-dateTime-to-timezone($vDateTime, xs:dayTimeDuration('P0DT4H') )"/&gt; &lt;xsl:sequence select= "format-dateTime($vadjustedDateTime, '[M01]/[D01]/[Y0001] [H01]:[m01]:[s01]' ) "/&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p><strong>which produces this result</strong>:</p> <pre><code>02/15/2006 21:00:00 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload