Highlighted

Time parting - Rule Builder - RegEx

Avatar

Avatar

chads47842055

Avatar

chads47842055

chads47842055

15-10-2015

hello,

I have a data element in DTM to capture the current time. I would like to set up a classification rule to take the time and classify by half hour. For example, it would take 12:53PM and classify it as 12:30PM. That is, the time stamp was within that half hour. Not a regex expert here and it seems like that would be the best way to avoid building the classification in excel. Can anyone help?

Thanks!
Chad

Replies

Highlighted

Avatar

Avatar

jeromerichard

Avatar

jeromerichard

jeromerichard

15-10-2015

Hey Chad,

I don't have a regex for you, but if you have access to the implementation itself as an alternative the most recent timeparting plugin provides an array of info including the time to the minute, time to the current 30min block, day of week and weekday/weekend.

I then concatenate all of these values into a single eVar for collection and use auto classification rules to separate out each component into a minute/30min/day classification of that eVar.

Hope that helps - if you don't have the timeparting code ClientCare should be able to help with the plugin & documentation, if you use appMeasurement make sure you also have the compatibility plugin.

Cheers, Jez

Highlighted

Avatar

Avatar

chads47842055

Avatar

chads47842055

chads47842055

15-10-2015

Thanks Jez. I decided to use a custom script data element and get the output to be what I needed it to be. Works just as well. Thanks again. I appreciate you reaching out.

cs