|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: sorting by date
Katie McNally wrote: > > The format of the dates returned in my XML is 17-Dec-2000 07:23:32. I need > to display dates as 12/17/00. I am formatting the dates I display by > calling the following template: [...snip...] The XSLT Standard Library, http://xsltsl.sf.net/, has a date-time module which includes a template for formatting dates. > I am displaying the dates in a table. The table can be sorted by the user > by clicking on the column titles. I am able to sort the table for all of > the non-date columns, but do not know how to sort the table by date. What it does *not* include is a way of parsing dates. You have to do that yourself :-( Get your dates into ISO format: YYYYMMDDHHMMSS. For example, 20011023141400 (2:14PM, 23rd October 2001). The date value can then be treated as an integer for sorting purposes. Use the date module in XSLTSL to get it back into a human-readable form. Cheers, Steve Ball -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Steve.Ball@xxxxxxxxx +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








