Expand my Community achievements bar.

SOLVED

Question: is there a way to create segment criteria that looks at an sprop that contains date and have it be a segment based on today's date?

Avatar

Level 2

We have an sprop that contains content publish date: YYYY-MM-DD format.

I'm trying to create a segment based on this sprop that looks at today's date.

What can I put in the Equals box to allow the segment to look at a rolling date in the value of the sprop?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Todd & Jeremy,

The prop and evar values are read in as Strings by AA. Hence it is impossible to create a segment treating the values as dates. Also, the format for dates keep changing (YYYY-MM-DD, DD/MM/YYY, MM/DD/YYYY, etc), so it is hard to convert the strings to dates.

For the questions regarding capturing Days of week, hour of day, etc, you may want to have a look at getTimeParting plugin.

There are also several time dimensions now available, which can be used to create a segment (not the prop value)

View solution in original post

2 Replies

Avatar

Level 2

I'd like to see an answer to this as well (date functions for dates captured in props or evars). 

The only remotely useful workaround I've found is to upload a classification of the evar (with classifications for day of week, week in year, month, etc).

Avatar

Correct answer by
Employee Advisor

Todd & Jeremy,

The prop and evar values are read in as Strings by AA. Hence it is impossible to create a segment treating the values as dates. Also, the format for dates keep changing (YYYY-MM-DD, DD/MM/YYY, MM/DD/YYYY, etc), so it is hard to convert the strings to dates.

For the questions regarding capturing Days of week, hour of day, etc, you may want to have a look at getTimeParting plugin.

There are also several time dimensions now available, which can be used to create a segment (not the prop value)