Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Time parting - Rule Builder - RegEx

chads47842055
Level 2
Level 2

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

2 Replies
jeromerichard
Level 4
Level 4

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

chads47842055
Level 2
Level 2

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