XP with Date and TIme

0
I’m getting a runtime error when I execute this XPath constrain. What is wrong with the syntax? Thanks  
asked
4 answers
2

Massimo

In Xpath, the correct syntax is this

[Date = '[%CurrentDateTime%] + 1 * [%DayLength%]']

One thing to keep in mind is that this XPath will only be true when the date is exactly 24 hours from the current date time.  This may be what you want.  But you may also use ranges, so if you are trying to retrieve things where Date is tomorrow, you could do something like this:

[Date > ‘[%EndOfCurrentDay%]’ and Date < '[%EndOfCurrentDay%] + 1 * [%DayLength%]']

Hope that helps,

Mike

answered
0

Oops!

 

 

answered
0

Hi Mike.

No, that is not the issue. First syntax is OK and works perfectly,

Something is wrong in the second sentence. BTW I replaced Date with ActivityDate

 

 

answered
0

Massimo,

Not sure how these got changed (maybe while pasting into the Forum?), but you should change these

to regular single quotes, like this

Let me know if that works for you.

Mike

answered