Hi,
I need to send an email to customers who celebrate their birthday this week.
I see I can create an expression based on the Month of the date of birth, and based on the day of date of birth.
Is there an option to only get those who celebrate their birthday this week? I could find a date expression I could use for that purpose.
Solved! Go to Solution.
Views
Replies
Total Likes
@MariBa , Say you're running the campaign on Day-1 of the every week and need to target those who have birthday on this week, you can try below condition,
Day(@birthDate) on or after Day( GetDate())
AND
Day(@birthDate) on or before Day(AddDays( GetDate() , 7))
AND
Month(@birthDate) on or after Month( GetDate())
AND
Month(@birthDate) on or before Month(AddDays( GetDate() , 7))
As a result, you can get all the recipients who has birthday this week:
Hi @MariBa ,
You can try the Query as,
ToInteger((DaysDiff(@birthDate, ToDateTime('01/01/'+Year(@birthDate))))/7)
Equals to
ToInteger((DaysDiff(GetDate(), ToDateTime('01/01/'+Year(GetDate()))))/7)
Thanks for the quick reply.
I tried it but the term "on or after" / "on or before" gets changed to "equal or greater than" / "equal or less than".
the outcome is all the customers whose birthday is today only.
Views
Replies
Total Likes
I tried the new condition but I'm getting an error.
I'm attaching print screens from the query. I can't seem to find what I'm doing wrong. maybe it has something to do with the account permissions? I'm not an admin.
Views
Replies
Total Likes
Hi MariBa,
Do you still face the issue? I cannot see the error message from your screenshot. Can you add the error message, please?
moreover, do you want to target all recipients on Monday, who have their birthday during the week (Monday to Friday) or just recipients who will have it in the next 7 days?
Thanks
Hi,
We've currently put this issue on hold.
If it comes up again, I'll try ParthaSarathy's additional suggestion.
Thank you so much for the quick response and follow up!
Marie
@MariBa , Say you're running the campaign on Day-1 of the every week and need to target those who have birthday on this week, you can try below condition,
Day(@birthDate) on or after Day( GetDate())
AND
Day(@birthDate) on or before Day(AddDays( GetDate() , 7))
AND
Month(@birthDate) on or after Month( GetDate())
AND
Month(@birthDate) on or before Month(AddDays( GetDate() , 7))
As a result, you can get all the recipients who has birthday this week:
Hi,
We've currently put this issue on hold.
However, should it be relevant again, I'll try your latest suggestion and let you know if it worked.
Thanks for the quick response!
Marie
Hi @MariBa,
I am closing this issue for now, considering @ParthaSarathy's latest suggestion as the next step. If you’d like to revisit this query in the future and discuss further, feel free to reach out. I’d be happy to assist again in re-opening this
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies