3

I am new in using the esper engine (java) - and I didn't find an answer in their documentation to the following question:

My event object has Date member. what date functions are available in this EPL query language to compare dates (before, after) to calculate the interval between two dates ([ where d1 - d2 > 4 days] etc. )

In short, where are all the date functions to this query langugage?

Eyal
  • 31
  • 2

2 Answers2

0

Esper currently doesn't itself offer EPL constructs specifically to handle Date/Calendar functions. Its easy however to plug in you own single-row function or static methods to handle. Version 4.2 is planned to have extensive datetime methods.

user650839
  • 2,594
  • 1
  • 13
  • 9
  • thanks for your response. so the easier thing is to convert the date to long and refer it as a number in the query? – Eyal Mar 23 '11 at 17:36
0

The latest version (8.8.0 as of writing this answer) has extensive date / time functions

http://esper.espertech.com/release-8.8.0/reference-esper/html/datetimereference.html

A similar example of after from that page

select * from A#lastevent as a, B#lastevent as b where a.after(b, 5 sec)
// Above matches when:
//   a.startTimestamp - b.endTimestamp >= 5 seconds
Dakotah North
  • 1,324
  • 12
  • 29