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
BedrockMission!

Learn More

View all

Sign in to view all badges

Adobe Campaign Standard Query for Birthday

Avatar

Avatar
Validate 10
Level 2
Clarence_Bunch_
Level 2

Likes

10 likes

Total Posts

58 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 10
Level 2
Clarence_Bunch_
Level 2

Likes

10 likes

Total Posts

58 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Give Back 5
Give Back 3
Give Back
View profile
Clarence_Bunch_
Level 2

15-06-2018

Floretlb,

Can you help me with a query to get the current date to send a Birthday email?  I am trying to using the Profile Attribute, Advanced Mode, and creating an expression (using @birthDate = GetDate()) but this is not returning any value.  Can you help?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
MVP
MarcelSzimonisz
MVP

Likes

102 likes

Total Posts

225 posts

Correct Reply

56 solutions
Top badges earned
Springboard
Establish
Contributor
Give Back 25
Give Back 10
View profile

Avatar
Springboard
MVP
MarcelSzimonisz
MVP

Likes

102 likes

Total Posts

225 posts

Correct Reply

56 solutions
Top badges earned
Springboard
Establish
Contributor
Give Back 25
Give Back 10
View profile
MarcelSzimonisz
MVP

17-07-2018

Hello,

Yes forgot about this little thing.

So In this case I would create, before the birthday check, a new field in Enrichemnt activity  bday_currentYear and checked that date as I described previously. You can create this  field by using functions e.g

ToDate(Year(GetDate()) +'-'+Month(bday)+'-'+Day(bday))

Marcel

Answers (7)

Answers (7)

Avatar

Avatar
Validate 1
Level 2
sqwgglz
Level 2

Likes

15 likes

Total Posts

41 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
sqwgglz
Level 2

Likes

15 likes

Total Posts

41 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
sqwgglz
Level 2

13-07-2018

Hi Marcel,

Doing it your doesn't take the year into consideration.

You say birthday (i.e.DD/MM) but it's actually the date of birth (i.e. DD/MM/YYYY) so saying X date is equal to date of birth would almost always pull incorrect information (as it's very unlikely a recipient will have a date of birth in 2018!)

Avatar

Avatar
Springboard
MVP
MarcelSzimonisz
MVP

Likes

102 likes

Total Posts

225 posts

Correct Reply

56 solutions
Top badges earned
Springboard
Establish
Contributor
Give Back 25
Give Back 10
View profile

Avatar
Springboard
MVP
MarcelSzimonisz
MVP

Likes

102 likes

Total Posts

225 posts

Correct Reply

56 solutions
Top badges earned
Springboard
Establish
Contributor
Give Back 25
Give Back 10
View profile
MarcelSzimonisz
MVP

11-07-2018

What about make it simply:

DateOnly(@bday) == DateOnly(current day)

or with lookahead

DateOnly(@bday) == DateOnly(current day +xyz days)

Marcel

Avatar

Avatar
Validate 1
Level 2
alistairk161838
Level 2

Likes

13 likes

Total Posts

37 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
alistairk161838
Level 2

Likes

13 likes

Total Posts

37 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
alistairk161838
Level 2

26-06-2018

Hi Clarence,

The below should help with the leap year issue

Sending a recurring birthday email

Avatar

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

369 likes

Total Posts

726 posts

Correct Reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

369 likes

Total Posts

726 posts

Correct Reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Vapsy
Employee

17-06-2018

The query filtering criteria provided by David will work in 99% cases. It will not send birthday emails to recipients born on 29th Feb and if the current year is not a leap year.

So such people should get an email on 1st of Mar or 28th of Feb, Please enhance the logic accordingly.

Regards,
vipul

Avatar

Avatar
Boost 5
Level 2
davidk21713691
Level 2

Likes

5 likes

Total Posts

27 posts

Correct Reply

9 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 5
Affirm 3
View profile

Avatar
Boost 5
Level 2
davidk21713691
Level 2

Likes

5 likes

Total Posts

27 posts

Correct Reply

9 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 5
Affirm 3
View profile
davidk21713691
Level 2

15-06-2018

You need to write your query as

Month(@birthDate) = Month(GetDate()) and Day(@birthDate)=Day(GetDate())

Thanks

David

Avatar

Avatar
Validate 1
Level 2
sqwgglz
Level 2

Likes

15 likes

Total Posts

41 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
sqwgglz
Level 2

Likes

15 likes

Total Posts

41 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
sqwgglz
Level 2

11-07-2018

Hey, I know this is a little old but It might be better to look for people who have a birthday coming up instead by using the AddDays function. For birthdays in 2 days for instance, use:

Month(@birthDate) = Month(AddDays(GetDate(), 2) and Day(@birthDate)=Day(AddDays(GetDate(), 2)

Avatar

Avatar
Validate 10
Level 2
Clarence_Bunch_
Level 2

Likes

10 likes

Total Posts

58 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 10
Level 2
Clarence_Bunch_
Level 2

Likes

10 likes

Total Posts

58 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Give Back 5
Give Back 3
Give Back
View profile
Clarence_Bunch_
Level 2

18-06-2018

Vipul,

How do you enhance the logic to accommodate these anomolies?