RE: [xsl] Sorting date in xsl

Subject: RE: [xsl] Sorting date in xsl
From: "Hahn, Kimberly" <Kim.Hahn@xxxxxxxxxx>
Date: Mon, 11 Jun 2001 14:13:44 -0500
If you convert the date into a string of numbers:

Tue, 29 May 2001 22:37:32
to
20010529223732

That creates a sortable value that should work.  Just make sure that you
always have 4 digits for the year and 2 for the month, day, hours, minutes
and seconds - basically always the same number of characters for each time
representation.  Otherwise you will not get a proper sort, ie. dec 29 1980
would be a larger number then may 29 2001 (19,801,229 to 2,001,529 vs.
19,801,229 to 20,010,529).

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Gitanjali
Sent: Saturday, June 09, 2001 6:39 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] Sorting date in xsl


Can any body tell me how to sort in xsl.  Do I need to conver the following
format to number and then do sorting..

Thanks

Narsu





<root>

<date>Tue, 29 May 2001 22:37:32 -0400</date>

<date>Tue, 25 May 2001 22:37:32 -0400</date>

<date>Tue, 21 May 2001 22:37:32 -0400</date>

<date>Tue, 23 May 2001 22:37:32 -0400</date>

</root>



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


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


Current Thread