This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Date/Time in XSLT and/or XPath
- From: Joerg Heinicke <joerg dot heinicke at gmx dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 16 May 2002 00:32:33 +0200
- Subject: Re: [xsl] Date/Time in XSLT and/or XPath
- References: <007001c1fc5a$79c3b610$9d47b9a3@austin.apc.slb.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
The dates and times should be brought in a number format, which allowes
to compare it easily. So it should be YYYYMMDDHHMMSS (example:
20020515213512 -> 15.05.2002, 21:35:12). I would change the XML if
possible. Otherwise you have to handle with substring().
Joerg
Faroukh Fekravar schrieb:
> Hi,
>
> I need to compare date and time, something like below
>
> <xsl:for-each select="../aaa/bbb[DtTmStart >= $StartTime and DtTmEnd
> <= $EndTime]">
>
> All four dates are in in format like
> 5/2/2000 3:00:00 AM
> or
> 5/2/2000 (assumed midnight)
>
> Is there anyway to do that (formatting, etc ..)
>
> Thanks for any help,
> Faroukh
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list