Author Message
andywfinlay
Joined: Jan 24, 2017
Messages: 30
Offline
what is the best way to grab only the time from the CallEvent ["timeOfEvent"].

the format is 'timeOfEvent':'2018-12-06 13:13:27

I am pretty sure this regex \d{2}:\d{2}:\d{2} will get me 13:13:27 but not sure how to get this and save it in a new variable.
I tried this:

CallEvent["timeOfEvent"].replace(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}, \d{2}:\d{2}:\d{2})

also tried
currentTime["TimeOfDay"]==Call["timeOfEvent"].replace(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}, \d{2}:\d{2}:\d{2})

the currentTime["TimeOfDay"] is a separate variable.

I am trying to figure out a way to route in ED based on time of call compared to time of day. maybe there is an easier way.

syntax on either of those is wrong. doing this in Engagement Designer.
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
Hi Andy, sorry for the delay in responding. You mentioned ED; is this question specific to ED or are you trying to parse this event in a Java snap-in. If in ED, there's definitely an easier way. As long as you have specified the correct task family / type in the start event or receive task, you should be able to map the contents of that field to a variable in your workflow with a simple double click and drag/drop.
Go to:   
Mobile view