Iff statement depending on Day of week

FrozenMana

Registered User.
Local time
Yesterday, 22:20
Joined
Aug 10, 2015
Messages
27
Back story, I have a query that needs to be run for 14 day days back (the data shows as a number not a date for the aging) when ran Mon-Thurs, on Friday's it needs to have all of the data.

Currently I have:
Code:
Field: Date() = "Friday"   | TotalDaysAged
Criteria: False                | <15
Criteria: True                 |

However when the query pulls it is saying that the current date which is Wednesday is Saturday. I have Date() in another query and it pulls the correct day of the week.
 
how can you have data and not record a date?
Wednesday is not a current date.
can this be fixed? ridiculous.

But in your query, add field Date(), and format(Date(),"ddd") as DoW
you will get the current date and day of week.
use this query as the basis to pull all prior records.
 
All of the dates recorded are the dates in which the events happened.
I have tired adding a field Date() with the format of dddd. However when I try put in for that field to = ("Monday" Or "Tuesday" Or "Wednesday" Or "Thursday") and "Friday" on the second line the query comes back blank.

I changed it to Not "Friday" and "Friday" and it seems to work. :banghead:
 
Last edited:
Can you post up some sample data and your query SQL - your explanation isn't making much sense?
 
The SQL is a bit lengthy as there are many fields actually being used.

The part I was referring to is:
Code:
HAVING  ((tblImportNetworkEMC.InternalAge)<15) AND ((Date())<>"Friday")) OR
((tblImportNetworkEMC.IntLastType)="DLSI") AND ((Date())="Friday"))

So far that is working. Date is in the dddd format for the currect day.

At first I tired to do:
Code:
HAVING  ((tblImportNetworkEMC.InternalAge)<15) AND ((Date())=("Monday","Tuesday",'Wednesday","Thursday")) OR
((tblImportNetworkEMC.IntLastType)="DLSI") AND ((Date())="Friday"))
however it was changing the date to Saturday.

Updated:
Code:
Day of week: WeekdayName(weekday(Date()),0,1)
Not In ("Friday")
 
Last edited:

Users who are viewing this thread

Back
Top Bottom