Apama 10.3.1 | Apama Documentation | 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.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.