Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSL:Sort by Date

From: delirio <migdemelo@----------.--->
To: NULL
Date: 6/6/2007 1:11:00 PM

On Jun 6, 2:04 pm, Jon <jom...@gmail.com> wrote:
> On Jun 6, 2:23 am, "toudidel" <x...@neostrada.pl> wrote:
>
> > Uzytkownik "Jon" <jom...@gmail.com> napisal w wiadomoscinews:1181076218.084228.210620@q......
>
> > > Can anyone advise me on how to sort an node group where the date is
> > > in
> > > the following format?     9/1/2006
>
> > you shoul better store date values in format recomended by W3 (date
> > YYYY-MM-DD or datetime YYYY-MM-DDTHH:MI:SSZ) because in this case you
> > haven't any problems sorting it as text value.
>
> >http://www.w3.org/TR/xmlschema-2/#duration
>
> > --
> > tdwww.paranoja.org
>
> Yes, thanks for the advice. Unfortunately, I'm not storing the values,
> they are being sent to me that way. I wanted to avoid requesting that
> they return their query results in a particular date format but it
> looks unavoidable.
>
> Thanks for your advice!

try this it works for me

<xsl:apply-templates select="Case/Payment">
            <xsl:sort select="PayDate[

concat(

substring(string-length(.) - 4, 4,string-length(.)),

substring-before(substring-after(., '/'), '/'),

substring-before(., '/')
                                                                )
                                                           ]"
order="descending"/>
        </xsl:apply-templates>



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent