Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Select recipients DOB between 2 specific date

Avatar

Level 2

Hello

 

I  need to filter people from my targeting with date of birth is between for example Aug 21 and Dec 23.

I tried a query like:

day of date of birth of targeting dimension greater than or equal to 23 and month of date of birth of targeting dimension greater than or equal to 8

But seems not what I want, I need to send a communication for the people when date of birth is between this two dates above. Any ideas?

 

Thank you

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Perhaps something like the following?

 

David__Garcia_0-1663673755389.png

 

0|Month(@birthDate)|12|=|||||0|/|0
0||||AND||||1|/|0
0|Day(@birthDate)|21|>=|||||0|/|1
0|Day(@birthDate)|23|<=|AND||||0|/|1
<ctx helpCond="Query: month of date of birth equal to 12 and (day of date of birth greater than or equal to 21 and day of date of birth less than or equal to 23)">
  <queryDef hideOrderby="true" hideSelect="true" label="Recipients" namespace="nms"
            operation="select" schema="nms:recipient" startPath="/" xtkschema="xtk:queryDef">
    <where displayFilter="month of date of birth equal to 12 and (day of date of birth greater than or equal to 21 and day of date of birth less than or equal to 23)">
      <condition boolOperator="AND" compositeKey="" dependkey="" enabledIf="" expr="Month(@birthDate) = 12"
                 internalId="0"/>
      <condition boolOperator="AND" internalId="1">
        <condition boolOperator="AND" compositeKey="" dependkey="" enabledIf="" expr="Day(@birthDate) &gt;= 21"
                   internalId="2772501133"/>
        <condition compositeKey="" dependkey="" enabledIf="" expr="Day(@birthDate) &lt;= 23"
                   internalId="2774336146"/>
      </condition>
    </where>
  </queryDef>
  <ignored _isNewEntity="false"/>
</ctx>

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Perhaps something like the following?

 

David__Garcia_0-1663673755389.png

 

0|Month(@birthDate)|12|=|||||0|/|0
0||||AND||||1|/|0
0|Day(@birthDate)|21|>=|||||0|/|1
0|Day(@birthDate)|23|<=|AND||||0|/|1
<ctx helpCond="Query: month of date of birth equal to 12 and (day of date of birth greater than or equal to 21 and day of date of birth less than or equal to 23)">
  <queryDef hideOrderby="true" hideSelect="true" label="Recipients" namespace="nms"
            operation="select" schema="nms:recipient" startPath="/" xtkschema="xtk:queryDef">
    <where displayFilter="month of date of birth equal to 12 and (day of date of birth greater than or equal to 21 and day of date of birth less than or equal to 23)">
      <condition boolOperator="AND" compositeKey="" dependkey="" enabledIf="" expr="Month(@birthDate) = 12"
                 internalId="0"/>
      <condition boolOperator="AND" internalId="1">
        <condition boolOperator="AND" compositeKey="" dependkey="" enabledIf="" expr="Day(@birthDate) &gt;= 21"
                   internalId="2772501133"/>
        <condition compositeKey="" dependkey="" enabledIf="" expr="Day(@birthDate) &lt;= 23"
                   internalId="2774336146"/>
      </condition>
    </where>
  </queryDef>
  <ignored _isNewEntity="false"/>
</ctx>

Avatar

Community Advisor

Hi @rbiri 

 

You can also try creating the below query 

AkshayAnand_0-1663683727467.png

which will give the result as 

AkshayAnand_1-1663683766479.png

filtered to 

AkshayAnand_2-1663683797653.png

 

If you want all the records regardless of the year then you can choose the query below 

AkshayAnand_3-1663684433281.png

AkshayAnand_4-1663684468340.png

 

Regards

 

Avatar

Administrator

Hi @rbiri,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!



Sukrity Wadhwa