views:

32

answers:

2

Hi,

This is a question for XSLT 2 format-dateTime function.

Please can anyone tell me how to make A.M./P.M. display with not dots/periods (AM/PM)?

<xsl:variable name="ampm" select="format-dateTime(DATE, '[PN]')"/>

The below code returns blank?

<xsl:value-of select="replace($ampm,'.','')"/>

Thanks, Will

A: 

translate works

<xsl:value-of select="translate($ampm,'.','')"/>
A: 
format-dateTime(DATE, '[PN,2-2]')

will output AM/PM on some XSLT 2 implementations.

The format string specifies that the output should be exactly 2 character.

Nick Jones