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 - inwkdays(<d start date>, <d end date>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 INWKDAYS(<D start date>, <D end date>)
 Evaluates the number of non-weekend days between two dates.
 Returns <expN> number of non-weekend days between two dates.

 Returns -1 if start date is greater than end date.

 Useful in applications that handle dates by five-day working weeks.

 date1 = CTOD("08/07/86")
 date2 = CTOD("08/17/86")
 date3 = CTOD("11/26/86")

 INWKDAYS( date1, date2 ) returns  7
 INWKDAYS( date1, date3 ) returns 80
 INWKDAYS( date2, date3 ) returns 73
 INWKDAYS( date3, date1 ) returns -1

 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 = INWKDAYS( startdate, enddate ) - h_count
 USE  && close files when no longer needed


             Placed in the Public Domain by Tom Rettig Assoc.

See Also: INMONTHS() INWEEKS() WEEKDAYS()

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