|
Question : weekday exclued weekend
|
|
Hi, I need to do a pop up reminder base on if the compeleted is null, the pop up reminder will reminder me from 14 days to 3 days before the comply date. RETDCOMPLY is date to comply, RETDCOMPT is date to complete, for example, if the Complete date is null, and the Comply date is set to 12/3/09, so I will get the pop up box from 11/3/09 which is the 14th day from the complete date until 11/30/09 the 3 days before , I can do the query with the calendar date, but I'm having reouble to figure out how to exclued weekend below is my query SELECT Event_Retention.RETTYPE AS TYPE, Event_Retention.RETCASENUM AS CASENO, Event_Retention.RETDOCKET AS DOCKET, IIf(IsNull([RETDCOMPT]),DateDiff("d",[RETDCOMPLY],Date())) AS RemDate1, [RETDCOMPLY]+[RemDate1] AS RemDate, Event_Retention.RETDCOMPLY AS DueDate, Event_Retention.RETATTY AS ATTYNAME, Event_Retention.RETPURPOSE AS DES, tblLoginSecurity.LoginID FROM (Event_Retention LEFT JOIN SAO_Attorney ON Event_Retention.RETATTY = SAO_Attorney.ATTYCODE) LEFT JOIN tblLoginSecurity ON SAO_Attorney.ATTYNAME = tblLoginSecurity.UserName WHERE (((IIf(IsNull([RETDCOMPT]),DateDiff("d",[RETDCOMPLY],Date())))<=-3 And (IIf(IsNull([RETDCOMPT]),DateDiff("d",[RETDCOMPLY],Date())))>=-14) AND ((Event_Retention.RETDCOMPLY) Is Not Null) AND ((tblLoginSecurity.LoginID)=Environ("USER")));
but this will show me that's the 13 days (inclued weekend) before the complete date(complete date will be 12/3/09), but I need that to show as 9 days (not count the weekend) before complete date.
any ideas. thanks
|
|
Answer : weekday exclued weekend
|
|
That would probably be the relevant places where you currently use DateDiff.
/gustav
|
|
|
|