Query to calculate anniversary | Community
Skip to main content
Sreevarshini-P
Level 2
May 5, 2023
Solved

Query to calculate anniversary

  • May 5, 2023
  • 1 reply
  • 1175 views

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

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ParthaSarathy

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())

 

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

 

1 reply

ParthaSarathy
Community Advisor
Community Advisor
May 5, 2023

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 S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
Sreevarshini-P
Level 2
May 5, 2023

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

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
May 5, 2023

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())

 

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

 

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups