ORACLE Xpath with date

2
Hi there, We are running on an ORACLE data base. When I execute the following xpath in a java action, it fails : List<IMendixObject> emailList = Core.retrieveXPathQueryEscaped(this.getContext(), "//Module.Entity[Attribute='Value' and " + " DateAttribute => '%s' ]", DateString); At the point where this executes I get the following error : com.mendix.core.CoreException: kL: An exception has occurred for the following request(s): jE (depth = 0): //Module.Entity[Attribute='Value' and DateAttribute => '2011-08-25' ] This only happens if there are results. Also, if I take out the date from the query it works fine (//Module.Entity[Attribute='Value']) I've also tried this : List<imendixobject> emailList = Core.retrieveXPathQueryEscaped(this.getContext(), "//Module.Entity[Attribute='$s' and " + " DateAttribute => '[%CurrentDateTime%]']", Value); Any ideas? Oh yeah, this works perfectly on a MS SQL database. Regards Frikkie.
asked
1 answers
4

Try swapping the 'greater than' and 'is' sign around. And for date searches, use the epoch value (date.getTime()), that should always work. Though I believe the date format with the year coming first may also work.

answered