Convert String format to UTC

I want convert “04-29-2023_140637” this date time format to
“2023-04-29T15:25:53.168Z” using apama epl.

please help me with a code snippet

You can use the TimeFormat event library.
Using the TimeFormat event library (

using com.apama.correlator.timeformat.TimeFormat;

	action convertDateTime(string str) returns string {
		return TimeFormat.formatUTC(TimeFormat.parseTimeUTC("MM-dd-yyyy_HHmmss", str), "yyyy-MM-dd'T'HH:mm:ss.SSSX");

I hope that helps.


Hi @joel.dockray

Thank you for the reply.
This code working fine.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.