Guest User

Untitled

a guest
May 28th, 2012
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. format and display datetime in xslt
  2. <A>
  3. <StartDate>2011-11-01T00:00:00</StartDate>
  4. <EndDate>2011-11-30T00:00:00</EndDate>
  5. <IsRecurring>false</IsRecurring>
  6. </A>
  7.  
  8. 01/11/2011 - 30/11/2011
  9.  
  10. <xsl:value-of select="A/StartDate/> - <xsl:value-of select="A/EndDate/>
  11.  
  12. 2011-11-01T00:00:00 - 2011-11-30T00:00:00
  13.  
  14. <xsl:variable name="dt" select="'2011-11-01T12:13:59'"/>
  15.  
  16. <xsl:value-of select="concat(
  17. substring($dt, 9, 2),
  18. '/',
  19. substring($dt, 6, 2),
  20. '/',
  21. substring($dt, 1, 4)
  22. )"/>
  23.  
  24. substring(replace($input, "(d{4})-(d{2})-(d{2})", "$3/$2/$1"), 0, 11)
Advertisement
Add Comment
Please, Sign In to add comment