Subject: RE: Date Range in XSL
From: "Avula, Raj" <ravula@xxxxxxxxxxx>
Date: Wed, 16 Apr 2003 10:37:40 -0700
|
<xsl:for-each select="recorddata">
<xsl:variable name="new_date"
select="concat(substring(date, 7, 4), substring(date, 1, 2), substring(date,
4, 2))" />
<xsl:if test="symbol='MSFT' and
$new_date>20030110 and $new_date<20030416">
<xsl:apply-templates select="." />
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="recorddata">
<xsl:value-of select="date" />
</xsl:template>
Above one should work. But you have to make sure to pass the Range of Dates
in the format YYYYMMDD
Raj...
-----Original Message-----
From: nshah@xxxxxxxxxxxx [mailto:nshah@xxxxxxxxxxxx]
Sent: Wednesday, April 16, 2003 10:29 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: Date Range in XSL
I am sorry but can you give a working example of how to do this. This is
the first time i am playing around with XSL and XML.
Thanks for your help..
Nehal
----- Forwarded by Nehal Shah/JerseyCity/Pershing on 04/16/03 01:34 PM
-----
"Avula, Raj"
<ravula@xxxxxxxxxxx> To:
"'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'"
Sent by:
<xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
owner-xsl-list@xxxxxxxxxxx cc:
rrytech.com Subject: RE:
Date Range in XSL
04/16/03 01:05 PM
Please respond to xsl-list
You are right David. I missed that part.
Thanks for pointing out.
Thanks,
Raj..
-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Wednesday, April 16, 2003 9:40 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Date Range in XSL
But How about this.
<xsl:apply-templates select="recorddata[symbol='MSFT' and
translate(date, '/', '')>01102003 and translate(date, '/',
'')<04162003]" />
Thanks,
That would have worked if the dates had been in yyyy/mm/dd format but
if the parts are not in that order you need to shuffle them
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
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 |
- RE: Date Range in XSL, (continued)
- Avula, Raj - Wed, 16 Apr 2003 11:57:36 -0400 (EDT)
- Avula, Raj - Wed, 16 Apr 2003 13:01:17 -0400 (EDT)
- nshah - Wed, 16 Apr 2003 13:24:29 -0400 (EDT)
- Avula, Raj - Wed, 16 Apr 2003 13:33:38 -0400 (EDT) <=
|
|