This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Q on ISO TimeDate convertion
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] Q on ISO TimeDate convertion
- From: Mark Nahabedian <naha at ai dot mit dot edu>
- Date: Wed, 7 Nov 2001 22:59:44 -0500
- References: <007801c167f7$66ce1750$65023c0a@ELOY01499A>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Walter Torres writes:
> I have an XSLT Template that converts the ISO TimeDate format to an American
> Standard display.
>
> 2001-10-18T12:27:46
>
> 10/18/2001 12:27:46
>
> My problem is that I really don't know how to convert the Time part to an
> AM/PM format, not just the 24 hour clock it is now.
If the hour is less than twelve, append AM after the time. If the
hour is greater than or equal to twelve, print the hour minus twelve
as the hour and append PM to the time.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list