0

I have a xslt code for getting date.my code is like

<xsl:copy-of select="substring-before(msxsl:node-set($notes)/root/item/LASTCHANGED,'T')"/>

her I got Output Like 2013-04-05

but I need to get Output Like 15 jan 2013.

How can I achive this?any one help

4

1 回答 1

0

只需更改顺序

XSLT

<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:ms="urn:schemas-microsoft-com:xslt"
      xmlns:dt="urn:schemas-microsoft-com:datatypes">
  <xsl:template match="/">
  <HTML>
  <HEAD>
  </HEAD>
  <BODY> 
   <xsl:for-each select="XMLSamples/FileDetails/Date">
      <DIV>
          Date Unedited:
          <xsl:value-of select="."/>
      </DIV>
      <DIV>
          Date Edited:
          <xsl:value-of select="ms:format-date(., 'MMM dd, yyyy')"/>
      </DIV>
   </xsl:for-each>
  </BODY> 
  </HTML>
</xsl:template>
</xsl:stylesheet>

输出

未编辑日期:2000-02-16T15:56:00

编辑日期:2000 年 2 月 16 日

于 2013-08-13T12:00:53.160 回答