Expand my Community achievements bar.

SOLVED

Using the Weekday function in a query

Avatar

Level 1

Hi,

I want to send a delivery to passenger who are scheduled to flight in a certain date range.
This delivery is only relevant to flights departing on Mondays within the given date range.
How do I use the "taken into account if" in the query for the DPT (departure date) parameter?

 

Thanks,
Marie

1 Accepted Solution

Avatar

Correct answer by
Level 3

Hi @MariBa ,
Use it like this:
Change eventDate with your custom date.

vt0509_0-1722490893273.png

 

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @MariBa 

 

I tried WeekDay(@lastModified)=0 in take into account if but It's not working as expected.

I will suggest you to enrich the daya with this WeekDay(@lastModified) and then use a split to exclude when the returned value is different from 0 (0=Monday -- 6=Sunday)

 

Thanks,

David



David Kangni

Avatar

Level 3

Hi @MariBa ,

Its working for me. Use function WeekDay(@Date) equal to 0, alongwith the date range you want to select.

Avatar

Level 1

it's not working for me.

Can you show me how exactly you used it?

I'm attaching a print screen from my query.
When I use it like this it ignores both the date range and the condition I've put in "taken into account"

 

MariBa_0-1722490092959.png

 

Avatar

Correct answer by
Level 3

Hi @MariBa ,
Use it like this:
Change eventDate with your custom date.

vt0509_0-1722490893273.png