Week calculation in Query Activity | Community
Skip to main content
Level 4
December 25, 2023
Solved

Week calculation in Query Activity

  • December 25, 2023
  • 1 reply
  • 551 views

Hi
There is a requirement that the campaign needs to be sent weekly.
Consider that there is a 90-day training period starting from January 1 to March 31.
So those months have 12 weeks.
and we have a date attribute to store the recipient's start date of training.

So we need to query which week the recipient started during the training period.
FYI, if the start date is January 10, they are in the 2nd week of the training period.

Like wise, I'm supposed to send a weekly campaign.

Does anyone have a solution for it?

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 @vani97 ,

You can use the below expression to get week difference between start date and current date,

ToInteger((DaysDiff(GetDate(), @trainingStartDate))/7)

Then you can use the week difference value to differentiate recipients based on their week and send respective delivery to them.

 

 

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
December 26, 2023

Hi @vani97 ,

You can use the below expression to get week difference between start date and current date,

ToInteger((DaysDiff(GetDate(), @trainingStartDate))/7)

Then you can use the week difference value to differentiate recipients based on their week and send respective delivery to them.

 

 

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