Date Function 
Author Message
 Date Function

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



Sat, 08 Jul 2000 03:00:00 GMT  
 Date Function

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




Sun, 09 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Calculating future date from date function

2. Date to Serial/Serial to Date functions

3. International Dates and VB Date Functions

4. 4 digit date w date function

5. dates and date functions

6. prob with ambiguous dates and vb date functions

7. VB Date/Time datatype and VB date functions

8. VB Date datatype and VB Date functions

9. VB Date/Time datatypes and VB date functions

10. Date function

11. Date() function

12. Access 2000 date function

 

 
Powered by phpBB® Forum Software