Re: [xsl] sorting date prob

Subject: Re: [xsl] sorting date prob
From: Jarkko.Moilanen@xxxxxx
Date: Thu, 11 Apr 2002 11:21:29 +0300 (EEST)
More...
> 
> you must bring the date to the format yyyymmdd. 

OK, but what if the date element also includes clocktime,
<Information>
    <Date>02/04/02 12:22:09</Date> #yymmdd hhmmss
</Information>

<xsl:sort order="descending" select="Date" />
(for some misc reason the descending results ascending)

Now the result tree isnt again correct. The result is that the messages
posted the same day are also in descending order: the last message first.
Good thing is that the messages are listed correctly by the date.

If I would use asecending the clocktimes are listed correctly, but the 
day listing is wrong. What to do?

 
Is the answer perhaps something like: 
Separate the date and clocktime to be 2 elements
Sort both of them. But how?

<Information>
    <Date>02/04/02</Date> #yymmdd
    <Time>12:22:09</Time> #hhmmss
</Information>



*******************************************************************
Jarkko Moilanen         *You are wise, witty, and wonderful,      *
Research/ ITCM          *but you spend too much time              *
jarkko.moilanen@xxxxxx  *reading this sort of trash.              *
www.uta.fi/~jm60697     *                                         *
GSM: +358 50 3766 927   *                                         *
*******************************************************************

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


Current Thread