how to create a weekday condition in a segment? | Community
Skip to main content
Level 2
December 18, 2024
Solved

how to create a weekday condition in a segment?

  • December 18, 2024
  • 1 reply
  • 942 views

Hi,

 

I need to set up a delivery that will be sent to relevant passengers 2 days before their flight.
The delivery should only be sent to passengers departing from a certain airport on Saturday.
In order to create this segment I need to use the Day of week date formula on my Departure date parameter and then set up another rule/condition that will check if there's a relevant flight 2 days from now.

 

How do I do 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 @mariba ,

You can utilize WeekDay() function in Enrichment/Query/Split. The output value for this function will be 0 to 6, where 0 as Monday and 6 as Saturday.

So for example, if you want to trigger only on Saturday, give the condition as,

WeekDay(GetDate()) equal to 6

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
December 18, 2024

Hi @mariba ,

You can utilize WeekDay() function in Enrichment/Query/Split. The output value for this function will be 0 to 6, where 0 as Monday and 6 as Saturday.

So for example, if you want to trigger only on Saturday, give the condition as,

WeekDay(GetDate()) equal to 6

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
MariBaAuthor
Level 2
December 18, 2024

Hi,
Thanks for the quick reply!

I tried to set it up but I must have done it wrong because I'm not getting any flights.
I haven't set up the condition to check if the departure date is 2 days away.
I started with the first part of getting all flights departing on saturdays but it's not working.

See the screenshot I've attached.

 

 

ParthaSarathy
Community Advisor
Community Advisor
December 18, 2024

now it's working! 🙂

How do I set up the condition that checks if the departure day is 2 days away and only then the delivery will take place?


@mariba ,

DateOnly(@depatureDateField) equals to DateOnly(AddDays(GetDate(),2 ))

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