Skip to content

Instantly share code, notes, and snippets.

@hitenpratap
Last active January 27, 2016 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hitenpratap/6e40263dc6bcc8675fe6 to your computer and use it in GitHub Desktop.
Save hitenpratap/6e40263dc6bcc8675fe6 to your computer and use it in GitHub Desktop.
Sort data in XSLT based on date
<xsl:sort select="normalize-space(substring(itpc:StartDate,1,4))" order="descending"/>
<xsl:sort select="normalize-space(substring(itpc:StartDate,6,2))" order="descending"/>
<xsl:sort select="normalize-space(substring(itpc:StartDate,9,2))" order="descending"/>
<!--Suppose date is in format: 2015-11-15T12:22:15-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment