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

Select recipients DOB between 2 specific date

Avatar

Level 1

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

2 Replies

Avatar

Employee 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

Level 2

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