Apama 10.15.5 | Developing Apama Applications | EPL Reference | Types | Timestamps, dates, and times
 
Timestamps, dates, and times
Although EPL does not have time, date, or datetime types, timestamp (a date and time) values can still be represented and manipulated because EPL uses the float type for storing timestamps. See currentTime.
Timestamp values are encoded as the number of seconds and fractional seconds (to a resolution of milliseconds) elapsed since midnight, January 1, 1970 UTC and do not have a time zone associated with them. Although the resolution is to milliseconds, the accuracy can be plus or minus 10 milliseconds, or some other value depending on the operating system.
If you have two float variables that both contain timestamp values, subtracting one from the other gives you the difference in seconds.
You can add or subtract a time interval from a timestamp by adding or subtracting the appropriate number of seconds (60.0 for 1 minute, 3600.0 for 1 hour, 86,400.0 for 1 day, and so forth).
See also:
*event.getTime() for information about when the correlator assigns timestamps to events (see the API Reference for EPL (ApamaDoc) ).
* Using the TimeFormat event library for information about formatting timestamps.