Help Please!!! Adding 5 Days to another Date in an access query
Good Morning,
Help please…. I am new to access and trying to write a query that will add 5 days between a RecDate and a DLPayDate
I created the query in design view of access.
Current Query: SELECT PaymentCalculator2.ID, PaymentCalculator2.RecDate, DateAdd("w",5+1,[RecDate]) AS DLPayDate, DateAdd("w",5,[RecDate]) AS DLPayDate2
FROM PaymentCalculator2
WHERE (((DateAdd("w",5+1,[RecDate]))=(DLookUp("[Holiday]","Holidays")))) OR ((("Else ")<>(DLookUp("[Holiday]","Holidays"))));
Problem: my current results are displaying in 3 columns and I don’t know how to fix it.
Needed Results:
2 columns 1st Column RecDate 2nd Column DLPayDate (= RecDate + 5 Days)
The DLPayDate should accommodate the following 3 scenarios:
1. RecDate + DLPaydate (RecDate +5 workdays – No Holidays)
2. RecDate + DLPayDate(RecDate + 6 days – add one additional day to inlcude Holiday)
3. RecDate + DLPayDate (RecDate + 5 days – skip Saturday and Sunday)
Additionally I created a lookup holiday table to reference and adjust when applicable.
Can someone please help me? I am in a bind and need this information for a meeting please.
Thanks,
“Z”