0

I am using XSLT version 1.0. I want to compare two dates( > or < or =).

Can any one help me? Below are the dates which I want to compare

1.2016-07-11 05:00:00 2.2016-07-11 06:00:00

Thanks.

Community
  • 1
  • 1

1 Answers1

1

XSLT 1.0 has no concept of dates and cannot compare them as such.

However, you can easily convert the given dates to comparable numerical values. For example:

translate($date1, '- :', '') &lt; translate($date2, '- :', '')

will return true.

michael.hor257k
  • 113,275
  • 6
  • 33
  • 51