Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - weekdays(<d date>, <n days>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 WEEKDAYS(<D date>, <N days>)
 Adds or subtracts non-weekend days to or from dates.
 Returns <expD> of <date> plus or minus <days> not counting weekends.

 <days> is the number of non-weekend days to add or subtract.

 * Add 60 "working days" to current date
 new_date = WEEKDAYS( DATE(), 60 )

 * Subtract 60 "working days" from current date
 new_date = WEEKDAYS( DATE(), -60 )

 Hazard
    Does not take holidays that fall during the week into consideration.
    To calculate the number of holidays between two dates, you can set
    up a database file with one date field and enter a record for each
    holiday that does not occur on a week end.

 USE Holidays
 COUNT FOR Holidate >= startdate .AND. Holidate <= enddate TO h_count
 days = days - h_count
 USE     && close files when no longer needed


             Placed in the Public Domain by Tom Rettig Assoc.

See Also: INWKDAYS()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson