Expand my Community achievements bar.

SOLVED

Week calculation in Query Activity

Avatar

Level 4

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?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @vani97 ,

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

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

ParthaSarathy_0-1703570278981.png

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

 

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @vani97 ,

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

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

ParthaSarathy_0-1703570278981.png

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