Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: XSL:Sort by Date [Thread Next] Re: XSL:Sort by DateTo: 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>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
