Developing Apama Applications > Developing Apama Applications in Event Modeler > Using Functions in Event Modeler > Reference information for provided functions > Date and time functions
Date and time functions
The following table describes the date and time functions.
Typical use
A typical use of most of these functions is something like the following:
ADD_YEAR(GET_CURRENT_TIME_AS_NUMBER(), 5)
Date and time functions
Function name
Return value
Parameters
Description
ADD_DAYS
float
float dateTime
float nrDays
Given a date plus a number of days, returns the result date in seconds since the epoch.
ADD_HOURS
float
float dateTime
float nrHours
Given a date plus a number of hours, returns the result date in seconds since the epoch.
ADD_MINUTES
float
float dateTime
float nrMins
Given a date plus a number of minutes, returns the result date in seconds since the epoch.
ADD_MONTHS
float
float dateTime
float nrMonths
Given a date plus a number of months, returns the result date in seconds since the epoch.
ADD_WEEKS
float
float dateTime
float nrWeeks
Given a date plus a number of weeks, returns the result date in seconds since the epoch.
ADD_YEARS
float
float dateTime
float nrYears
Given a date plus a number of years, returns the result date in seconds since the epoch.
FORMAT_TIME
string
float TimeInSeconds
string TimeFormat
Returns the specified time and date in a formatted string. For example:
FORMAT_TIME(GET_CURRENT_TIME(),
   "dd-MM-yyyy HH:mm:ss")
For format options, see Using the Time Format plug-in in Developing Apama Applicatons in EPL.
GET_CURRENT_DATE
string
none
Returns the current date in a formatted string. For example, "11 June 2007".
GET_CURRENT_DATE _TIME
string
none
Returns the current date and time in a formatted string. For example, "11 June 2007 11:10:23".
GET_CURRENT_TIME
string
none
Returns the current time in a formatted string. For example, "11:10:25".
GET_CURRENT_TIME _AS_NUMBER
float
none
Returns the current time as a number of seconds since the epoch, January 1, 1970.
GET_CURRENT_TIME _FORMATTED
string
string TimeFormat
Returns the current time and date in a formatted string.
For format options, see Using the Time Format plug-in in Developing Apama Applicatons in EPL.
GET_DAY_IN_WEEK
float
float dateTime
Returns the day of the week for the given date.
GET_DAY_IN_YEAR
float
float dateTime
Returns the day in the year for the given date.
GET_MONTH_IN_YEAR
float
float dateTime
Returns the month in the year for the given date.
GET_WEEK_IN_MONTH
float
float dateTime
Returns the week in the month for the given date.
GET_WEEK_IN_YEAR
float
float dateTime
Returns the week in the year for the given date.
IS_LEAP_YEAR
boolean
float year
Returns true if the given year is a leap year.
PARSE_TIME
float
string TimeDate
string TimeFormat
Returns the specified time and date in a numeric format. For example:
PARSE_TIME (GET_CURRENT_TIME(), "H:m:s")
For format options, see Using the Time Format plug-in in Developing Apama Applicatons in EPL.
Copyright © 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.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.