xslt 1.0 to convert xs:date to a specific dateFormat DD-MON-YYYY
问题 I am new to xslt. so this might be a basic question. I am trying to convert a date received in xs:date format to DD-MON-YYYY input received is : <tns:receivedDate>2017-06-27</tns:receivedDate> Output expected <tns:receivedDate>27-JUN-2017</tns:receivedDate> Thanks in advance 回答1: If you mean convert YYYY-MM-DD to DD-MMM-YYYY , try: <xsl:template name="format-date"> <xsl:param name="date"/> <!-- day --> <xsl:value-of select="substring($date, 9, 2)"/> <xsl:text>-</xsl:text> <!-- month --> <xsl