Using the Weekday function in a query | Community
Skip to main content
Level 2
July 31, 2024
Solved

Using the Weekday function in a query

  • July 31, 2024
  • 2 replies
  • 924 views

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

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 vt0509

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

 

2 replies

DavidKangni
Community Advisor
Community Advisor
July 31, 2024

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
Level 3
August 1, 2024

Hi @mariba ,

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

MariBaAuthor
Level 2
August 1, 2024

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"

 

 

MariBaAuthor
Level 2
August 1, 2024

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

 


Yes! now it works!
Thanks a lot!

🙂