When I use the XML serializer to serialize a DateTime, it is written in the following format:
<Date>2007-11-14T12:01:00</Date>
When passing this through an XSLT stylesheet to output HTML, how can I format this? In most cases I just need the date, and when I need the time I of course don’t want the ‘funny T’ in there.
Here are a couple of 1.0 templates that you can use:-
Call them with:-
and
where xpath is the path to an element or attribute that has the standard date time format.