If you add a daterange in your GUI it generates
AND CreateTime in $DateRange
Where CreateTime is my date-time attribute. And try
For the 2nd part of your query.
This will almost never lead to a result because a datetime is an exact moment in time including milliseconds. You could use the token BeginOfCurrentDay and check if it's bigger than that and smaller than BeginOfCurrentDay + DayLength. Also see the available tokens in the XPath documentation, you can also use these in OQL. Check https://world.mendix.com/display/refguide3/XPath+Keywords+and+System+Variables
FROM B.Border AS Object....
And where clause
WHERE Object[daterec > '[%BeginOfCurrentDay%]' AND daterec < '[%BeginOfCurrentDay%]' + '[%DayLength%]']
however i get a error: "no viable alternative at input "[" " i use an exaple from the XPath article. Why do i get this error?
I hope i understand you correctly but:
WHERE Object[daterec > '[%BeginOfCurrentDay%]' AND daterec IN $DateRange <= '[%EndOfCurrentDay%]' ]
has the same result. I don't understand even if i copy a exaple exactly (with my vars) i keep on getting the errors.