This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Date Comparison using ">=" and "<=" doesn't work -WHY!?!?


Thanks for the reply.  Still haven't been able to figure this one out.  By the way, how does one go about viewing these posting on the site itself (I'm receiving them in my e-mail client) ... I did a search for "date comparison" at http://www.biglist.com/lists/xsl-list/archives/ but the posting I've made today don't show up.  Would you be so kind as to direct me to the right page to view these postings ...  Thanks!



>>> dionh@microsoft.com 03/11/02 03:02PM >>>
Actually in this particular case it won't, because date is not an XSLT
type.  Therefore the two operands will be converted as if by the
number() function.  

I believe MSXSL4 has a method of comparing dates, though...

Dion
-----Original Message-----
From: Snow, Corey [mailto:CSNOW@ddpwa.com] 
Sent: Monday, March 11, 2002 3:45 PM
To: 'xsl-list@lists.mulberrytech.com' 
Cc: 'GregP@nbsys.com' 
Subject: RE: [xsl] Date Comparison using ">=" and "<=" doesn't work -
WHY!?!?

You have to use the escaped versions: &lt; and &gt; (well, technically,
only
the "<" character must be escaped, but it's best to do both).

So the comparison should be date &gt;='2/10/02' and Date
&lt;='2/15/2002'

Weird, I know. But it works. Taken from Mike Kay's book XSLT 2d Edition,
page 416.

Corey



> -----Original Message-----
> From: Gregory Pearson [mailto:GregP@nbsys.com] 
> Sent: Monday, March 11, 2002 3:29 PM
> To: XSL-List@lists.mulberrytech.com 
> Subject: [xsl] Date Comparison using ">=" and "<=" doesn't work -
> WHY!?!?
> 
> 
> Hi.
> 
> This works:
> 
>      
> Style.XMLDocument.selectNodes("//xsl:apply-templates/@select")
> (1).value = "record[Date = '2/12/02']";
> 
> This does NOT work:
> 
>      
> Style.XMLDocument.selectNodes("//xsl:apply-templates/@select")
> (1).value = "record[Date >= '2/10/02' and Date <= 
> '2/15/02']";					
> 
> IS IT NOT POSSIBLE TO USER ">=" AND "<=" FOR DATES?
> 
> Thanks!!
> 
> 
> 					
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list 
> 

#########################################################
The information contained in this e-mail and subsequent attachments may
be privileged, 
confidential and protected from disclosure.  This transmission is
intended for the sole 
use of the individual and entity to whom it is addressed.  If you are
not the intended 
recipient, any dissemination, distribution or copying is strictly
prohibited.  If you 
think that you have received this message in error, please e-mail the
sender at the above 
e-mail address.
#########################################################

 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]