Hi,
Q1-
Compute:
3 - Weekday(DateSerial(TheYear, TheMonth, 17))
add 7 if this value is negative (0 if positive)
add the previous result to the DateSerial result
Q2-
Compute:
Select Weekday(DateSerial(TheYear, THeMonth, 17))
Case 6: ' Friday, add 3
res=3
Case 7: ' Saturday, add 2
res=2
Case Else ' Sunday or other, add 1
res=1
End Select
add res to the DateSerial value to get the next working day (assuming
Monday to Friday are always working days).
Hope it may help,
Vanderghast, Access MVP.
Quote:
>I want to find the first Tuesday after the 17th of each month.
>Any ideas?
>also I need the first working day after the 17th
>Thanks
>--
>Moiz
>London