Developing Apama Applications > Developing Apama Applications in EPL > Using Correlator Plug-ins in EPL > Using the Time Format plug-in > parseTimeFromPattern()
parseTimeFromPattern()
The parseTimeFromPattern() function parses the timeDate string according to the time/date parser object in the compiledFormat parameter. This function returns the result as a float of seconds since the epoch.
Usage
float parseTimeFromPattern(chunk compiledFormat, string timeDate)
Usage description
compiledFormat
Chunk that contains a time/date parser object. This chunk is the result of one of the compilePattern() functions. See Time Format plug-in compile pattern functions.
timeDate
String that represents a time and/or a date.
For more information about the return value, see the description of Time Format plug-in parse functions. For an example of how to use parseTimeFromPattern(), see Time Format plug-in compile pattern functions.
Note that the following are equivalent:
parse(format, timeDate)
parseTime (format, timeDate)
parseTimeFromPattern(compilePattern(format), timeDate)
Patterns with textual elements operate by default in English, but will instead both produce output and expect input in another language if that has been set in the environment. For example, under Linux, if the correlator is running with the LC_ALL environment variable set to "fr_FR", the format "EEEE dd MMMM yyyy G" produces and expects "jeudi 01 janvier 1970 ap. J.-C." for time 0.0.
Copyright © 2013-2015 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.