Expand my Community achievements bar.

Adobe Campaign User Groups are live now. Join our Adobe Campaign User Groups and connect with your local leaders!
SOLVED

Query to calculate anniversary

Avatar

Level 3

Hi Team,

 

 

Can anyone tell me how to calculate the anniversary date in an organization 

Req: Should send mail automatically when an employee completed one year in an organization. I need the Query conditions to calculate that

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Sreevarshini-P ,

In that case you can use a condition like,

 

Day(@dateOfJoining) EQUAL TO Day(GetDate())

AND
Month(@dateOfJoining) EQUAL TO Month(GetDate())

 

ParthaSarathy_0-1683283119984.png

In the above screenshot, you can use @dateOfJoining instead of date of birth

ParthaSarathy_0-1683291176493.png

 

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @Sreevarshini-P ,

Create a date type attribute which stores the Date of joining in schema (Example, @dateOfJoining)

Query:

@dateOfJoining EQUALS TO DateOnly(SubYears(GetDate(),1 ))

(Output: Recipient who had joined the organization 1 year Ago)

ParthaSarathy_0-1683271089216.png

 

 

Avatar

Level 3

Hi @ParthaSarathy 

 

 

Thank you for your reply. But my requirement is that i need to send delivery for all the employees whoever is having the anniversary not only the 1st year but also for all the number of years.

 

eg: Employee :001 - First year anniversary celebration

      Employee :002 - 4th year anniversary celebration 

so the delivery should be sent according to their joining dates every year

Avatar

Correct answer by
Community Advisor

Hi @Sreevarshini-P ,

In that case you can use a condition like,

 

Day(@dateOfJoining) EQUAL TO Day(GetDate())

AND
Month(@dateOfJoining) EQUAL TO Month(GetDate())

 

ParthaSarathy_0-1683283119984.png

In the above screenshot, you can use @dateOfJoining instead of date of birth

ParthaSarathy_0-1683291176493.png