[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Formatting a date

Subject: Re: Formatting a date
From: "Christopher R. Maden" <crism@xxxxxxxxxx>
Date: Fri, 11 Aug 2000 17:22:03 -0700
replacesubstring date
At 18:38 11-08-2000 -0400, Heather Lindsay wrote:
        A little efficiency question for you.
        I have a date which is in the form of "CCYYMMDD.HHMMSS" and I'm
formatting this date to look like this: "MM/DD/YYYY HH:MM:SS GMT".  I have
my own way of doing this but I suspect that there is a better way.  Can
anyone tell me if there is?  I tried format-number() originally but it
choked on the ":".  What I'm doing now works but isn't very pretty.  Code
below.

An excuse to publish! I wrote some ISO 8601 parsing code as part of an invoice generator. Naturally, I got it good enough for me, and then was waiting to properly document it before sharing it, and never got around to it. I'll post a URL shortly.


The code won't handle CCYYMMDD.HHMMSS exactly, but it handles YYYY-MM-DDTHH:MM:SS (and subsets thereof), and should be applicable (replace substring-before() calls with substring() and appropriate parameters).

-Chris
--
Christopher R. Maden, Senior XML Analyst, Lexica LLC
222 Kearny St., Ste. 202, San Francisco, CA 94108-4510
+1.415.901.3631 tel./+1.415.477.3619 fax
<URL:http://www.lexica.net/> <URL:http://www.oreilly.com/%7Ecrism/>


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.